home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / bash_114.zip / bash-1.14.2 / documentation / features.info (.txt) < prev    next >
GNU Info File  |  1994-08-04  |  111KB  |  2,259 lines

  1. This is Info file features.info, produced by Makeinfo-1.55 from the
  2. input file features.texi.
  3. This text is a brief description of the features that are present in
  4. the Bash shell.
  5. This is Edition 1.14, last updated 4 August 1994,
  6. of `The GNU Bash Features Guide',
  7. for `Bash', Version 1.14.
  8. Copyright (C) 1991, 1993 Free Software Foundation, Inc.
  9. This file is part of GNU Bash, the Bourne Again SHell.
  10. Bash is free software; you can redistribute it and/or modify it
  11. under the terms of the GNU General Public License as published by
  12. the Free Software Foundation; either version 1, or (at your option)
  13. any later version.
  14. Bash is distributed in the hope that it will be useful, but WITHOUT
  15. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  16. or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
  17. License for more details.
  18. You should have received a copy of the GNU General Public License
  19. along with Bash; see the file COPYING.  If not, write to the Free
  20. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21. File: features.info,  Node: Top,  Next: Bourne Shell Features,  Prev: (DIR),  Up: (DIR)
  22. Bash Features
  23. *************
  24.    Bash contains features that appear in other popular shells, and some
  25. features that only appear in Bash.  Some of the shells that Bash has
  26. borrowed concepts from are the Bourne Shell (`sh'), the Korn Shell
  27. (`ksh'), and the C-shell (`csh' and its successor, `tcsh'). The
  28. following menu breaks the features up into categories based upon which
  29. one of these other shells inspired the feature.
  30.    This manual is meant as a brief introduction to features found in
  31. Bash.  The Bash manual page should be used as the definitive reference
  32. on shell behavior.
  33. * Menu:
  34. * Bourne Shell Features::    Features originally found in the
  35.                 Bourne shell.
  36. * Csh Features::        Features originally found in the
  37.                 Berkeley C-Shell.
  38. * Korn Shell Features::        Features originally found in the Korn
  39.                 Shell.
  40. * Bash Specific Features::    Features found only in Bash.
  41. * Job Control::            A chapter describing what job control is
  42.                 and how bash allows you to use it.
  43. * Using History Interactively::    Chapter dealing with history expansion
  44.                 rules.
  45. * Command Line Editing::    Chapter describing the command line
  46.                 editing features.
  47. * Variable Index::        Quick reference helps you find the
  48.                 variable you want.
  49. * Concept Index::        General index for this manual.
  50. File: features.info,  Node: Bourne Shell Features,  Next: Csh Features,  Prev: Top,  Up: Top
  51. Bourne Shell Style Features
  52. ***************************
  53.    Bash is an acronym for Bourne Again SHell.  The Bourne shell is the
  54. traditional Unix shell originally written by Stephen Bourne.  All of
  55. the Bourne shell builtin commands are available in Bash, and the rules
  56. for evaluation and quoting are taken from the Posix 1003.2
  57. specification for the `standard' Unix shell.
  58.    This section briefly summarizes things which Bash inherits from the
  59. Bourne shell: shell control structures, builtins, variables, and other
  60. features.  It also lists the significant differences between Bash and
  61. the Bourne Shell.
  62. * Menu:
  63. * Looping Constructs::        Shell commands for iterative action.
  64. * Conditional Constructs::    Shell commands for conditional execution.
  65. * Shell Functions::        Grouping commands by name.
  66. * Bourne Shell Builtins::    Builtin commands inherited from the Bourne
  67.                 Shell.
  68. * Bourne Shell Variables::    Variables which Bash uses in the same way
  69.                 as the Bourne Shell.
  70. * Other Bourne Shell Features::    Addtional aspects of Bash which behave in
  71.                 the same way as the Bourne Shell.
  72. File: features.info,  Node: Looping Constructs,  Next: Conditional Constructs,  Up: Bourne Shell Features
  73. Looping Constructs
  74. ==================
  75.    Note that wherever you see a `;' in the description of a command's
  76. syntax, it may be replaced indiscriminately with one or more newlines.
  77.    Bash supports the following looping constructs.
  78. `until'
  79.      The syntax of the `until' command is:
  80.           until TEST-COMMANDS; do CONSEQUENT-COMMANDS; done
  81.      Execute CONSEQUENT-COMMANDS as long as the final command in
  82.      TEST-COMMANDS has an exit status which is not zero.
  83. `while'
  84.      The syntax of the `while' command is:
  85.           while TEST-COMMANDS; do CONSEQUENT-COMMANDS; done
  86.      Execute CONSEQUENT-COMMANDS as long as the final command in
  87.      TEST-COMMANDS has an exit status of zero.
  88. `for'
  89.      The syntax of the for command is:
  90.           for NAME [in WORDS ...]; do COMMANDS; done
  91.      Execute COMMANDS for each member in WORDS, with NAME bound to the
  92.      current member.  If "`in WORDS'" is not present, "`in "$@"'" is
  93.      assumed.
  94. File: features.info,  Node: Conditional Constructs,  Next: Shell Functions,  Prev: Looping Constructs,  Up: Bourne Shell Features
  95. Conditional Constructs
  96. ======================
  97.      The syntax of the `if' command is:
  98.           if TEST-COMMANDS; then
  99.             CONSEQUENT-COMMANDS;
  100.           [elif MORE-TEST-COMMANDS; then
  101.             MORE-CONSEQUENTS;]
  102.           [else ALTERNATE-CONSEQUENTS;]
  103.           fi
  104.      Execute CONSEQUENT-COMMANDS only if the final command in
  105.      TEST-COMMANDS has an exit status of zero.  Otherwise, each `elif'
  106.      list is executed in turn, and if its exit status is zero, the
  107.      corresponding MORE-CONSEQUENTS is executed and the command
  108.      completes.  If "`else ALTERNATE-CONSEQUENTS'" is present, and the
  109.      final command in the final `if' or `elif' clause has a non-zero
  110.      exit status, then execute ALTERNATE-CONSEQUENTS.
  111. `case'
  112.      The syntax of the `case' command is:
  113.           `case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac'
  114.      Selectively execute COMMANDS based upon WORD matching PATTERN.
  115.      The ``|'' is used to separate multiple patterns.
  116.      Here is an example using `case' in a script that could be used to
  117.      describe an interesting feature of an animal:
  118.           echo -n "Enter the name of an animal: "
  119.           read ANIMAL
  120.           echo -n "The $ANIMAL has "
  121.           case $ANIMAL in
  122.             horse | dog | cat) echo -n "four";;
  123.             man | kangaroo ) echo -n "two";;
  124.             *) echo -n "an unknown number of";;
  125.           esac
  126.           echo "legs."
  127. File: features.info,  Node: Shell Functions,  Next: Bourne Shell Builtins,  Prev: Conditional Constructs,  Up: Bourne Shell Features
  128. Shell Functions
  129. ===============
  130.    Shell functions are a way to group commands for later execution
  131. using a single name for the group.  They are executed just like a
  132. "regular" command.  Shell functions are executed in the current shell
  133. context; no new process is created to interpret them.
  134.    Functions are declared using this syntax:
  135.      [ `function' ] NAME () { COMMAND-LIST; }
  136.    This defines a function named NAME.  The BODY of the function is the
  137. COMMAND-LIST between { and }.  This list is executed whenever NAME is
  138. specified as the name of a command.  The exit status of a function is
  139. the exit status of the last command executed in the body.
  140.    When a function is executed, the arguments to the function become
  141. the positional parameters during its execution.  The special parameter
  142. `#' that gives the number of positional parameters is updated to
  143. reflect the change.  Positional parameter 0 is unchanged.
  144.    If the builtin command `return' is executed in a function, the
  145. function completes and execution resumes with the next command after
  146. the function call.  When a function completes, the values of the
  147. positional parameters and the special parameter `#' are restored to the
  148. values they had prior to function execution.
  149. File: features.info,  Node: Bourne Shell Builtins,  Next: Bourne Shell Variables,  Prev: Shell Functions,  Up: Bourne Shell Features
  150. Bourne Shell Builtins
  151. =====================
  152.    The following shell builtin commands are inherited from the Bourne
  153. shell.  These commands are implemented as specified by the Posix 1003.2
  154. standard.
  155.      Do nothing beyond expanding any arguments and performing
  156.      redirections.
  157.      Read and execute commands from the FILENAME argument in the
  158.      current shell context.
  159. `break'
  160.      Exit from a `for', `while', or `until' loop.
  161.      Change the current working directory.
  162. `continue'
  163.      Resume the next iteration of an enclosing `for', `while', or
  164.      `until' loop.
  165. `echo'
  166.      Print the arguments, separated by spaces, to the standard output.
  167. `eval'
  168.      The arguments are concatenated together into a single command,
  169.      which is then read and executed.
  170. `exec'
  171.      If a COMMAND argument is supplied, it replaces the shell.  If no
  172.      COMMAND is specified, redirections may be used to affect the
  173.      current shell environment.
  174. `exit'
  175.      Exit the shell.
  176. `export'
  177.      Mark the arguments as variables to be passed to child processes in
  178.      the environment.
  179. `getopts'
  180.      Parse options to shell scripts or functions.
  181. `hash'
  182.      Remember the full pathnames of commands specified as arguments, so
  183.      they need not be searched for on subsequent invocations.
  184. `kill'
  185.      Send a signal to a process.
  186. `pwd'
  187.      Print the current working directory.
  188. `read'
  189.      Read a line from the shell input and use it to set the values of
  190.      specified variables.
  191. `readonly'
  192.      Mark variables as unchangable.
  193. `return'
  194.      Cause a shell function to exit with a specified value.
  195. `shift'
  196.      Shift positional parameters to the left.
  197. `test'
  198.      Evaluate a conditional expression.
  199. `times'
  200.      Print out the user and system times used by the shell and its
  201.      children.
  202. `trap'
  203.      Specify commands to be executed when the shell receives signals.
  204. `umask'
  205.      Set the shell process's file creation mask.
  206. `unset'
  207.      Cause shell variables to disappear.
  208. `wait'
  209.      Wait until child processes exit and report their exit status.
  210. File: features.info,  Node: Bourne Shell Variables,  Next: Other Bourne Shell Features,  Prev: Bourne Shell Builtins,  Up: Bourne Shell Features
  211. Bourne Shell Variables
  212. ======================
  213.    Bash uses certain shell variables in the same way as the Bourne
  214. shell.  In some cases, Bash assigns a default value to the variable.
  215. `IFS'
  216.      A list of characters that separate fields; used when the shell
  217.      splits words as part of expansion.
  218. `PATH'
  219.      A colon-separated list of directories in which the shell looks for
  220.      commands.
  221. `HOME'
  222.      The current user's home directory.
  223. `CDPATH'
  224.      A colon-separated list of directories used as a search path for
  225.      the `cd' command.
  226. `MAILPATH'
  227.      A colon-separated list of files which the shell periodically checks
  228.      for new mail.    You can also specify what message is printed by
  229.      separating the file name from the message with a `?'.  When used
  230.      in the text of the message, `$_' stands for the name of the
  231.      current mailfile.
  232. `PS1'
  233.      The primary prompt string.
  234. `PS2'
  235.      The secondary prompt string.
  236. `OPTIND'
  237.      The index of the last option processed by the `getopts' builtin.
  238. `OPTARG'
  239.      The value of the last option argument processed by the `getopts'
  240.      builtin.
  241. File: features.info,  Node: Other Bourne Shell Features,  Prev: Bourne Shell Variables,  Up: Bourne Shell Features
  242. Other Bourne Shell Features
  243. ===========================
  244. * Menu:
  245. * Major Differences from the Bourne Shell::    Major differences between
  246.                         Bash and the Bourne shell.
  247.    Bash implements essentially the same grammar, parameter and variable
  248. expansion, redirection, and quoting as the Bourne Shell.  Bash uses the
  249. Posix 1003.2 standard as the specification of how these features are to
  250. be implemented.  There are some differences between the traditional
  251. Bourne shell and the Posix standard; this section quickly details the
  252. differences of significance.  A number of these differences are
  253. explained in greater depth in subsequent sections.
  254. File: features.info,  Node: Major Differences from the Bourne Shell,  Up: Other Bourne Shell Features
  255. Major Differences from the Bourne Shell
  256. ---------------------------------------
  257.    Bash implements the `!' keyword to negate the return value of a
  258. pipeline.  Very useful when an `if' statement needs to act only if a
  259. test fails.
  260.    Bash includes brace expansion (*note Brace Expansion::.).
  261.    Bash includes the Posix and `ksh'-style pattern removal `%%' and
  262. `##' constructs to remove leading or trailing substrings from variables.
  263.    The Posix and `ksh'-style `$()' form of command substitution is
  264. implemented, and preferred to the Bourne shell's ```' (which is also
  265. implemented for backwards compatibility).
  266.    Variables present in the shell's initial environment are
  267. automatically exported to child processes.  The Bourne shell does not
  268. normally do this unless the variables are explicitly marked using the
  269. `export' command.
  270.    The expansion `${#xx}', which returns the length of `$xx', is
  271. supported.
  272.    The `IFS' variable is used to split only the results of expansion,
  273. not all words.  This closes a longstanding shell security hole.
  274.    It is possible to have a variable and a function with the same name;
  275. `sh' does not separate the two name spaces.
  276.    Bash functions are permitted to have local variables, and thus useful
  277. recursive functions may be written.
  278.    The `noclobber' option is available to avoid overwriting existing
  279. files with output redirection.
  280.    Bash allows you to write a function to override a builtin, and
  281. provides access to that builtin's functionality within the function via
  282. the `builtin' and `command' builtins.
  283.    The `command' builtin allows selective disabling of functions when
  284. command lookup is performed.
  285.    Individual builtins may be enabled or disabled using the `enable'
  286. builtin.
  287.    Functions may be exported to children via the environment.
  288.    The Bash `read' builtin will read a line ending in \ with the `-r'
  289. option, and will use the `$REPLY' variable as a default if no arguments
  290. are supplied.
  291.    The `return' builtin may be used to abort execution of scripts
  292. executed with the `.' or `source' builtins.
  293.    The `umask' builtin allows symbolic mode arguments similar to those
  294. accepted by `chmod'.
  295.    The `test' builtin is slightly different, as it implements the Posix
  296. 1003.2 algorithm, which specifies the behavior based on the number of
  297. arguments.
  298. File: features.info,  Node: Csh Features,  Next: Korn Shell Features,  Prev: Bourne Shell Features,  Up: Top
  299. C-Shell Style Features
  300. **********************
  301.    The C-Shell ("`csh'") was created by Bill Joy at UC Berkeley.  It is
  302. generally considered to have better features for interactive use than
  303. the original Bourne shell.  Some of the `csh' features present in Bash
  304. include job control, history expansion, `protected' redirection, and
  305. several variables for controlling the interactive behaviour of the shell
  306. (e.g. `IGNOREEOF').
  307.    *Note Using History Interactively:: for details on history expansion.
  308. * Menu:
  309. * Tilde Expansion::        Expansion of the ~ character.
  310. * Brace Expansion::        Expansion of expressions within braces.
  311. * C Shell Builtins::        Builtin commands adopted from the C Shell.
  312. * C Shell Variables::        Variables which Bash uses in essentially
  313.                 the same way as the C Shell.
  314. File: features.info,  Node: Tilde Expansion,  Next: Brace Expansion,  Up: Csh Features
  315. Tilde Expansion
  316. ===============
  317.    Bash has tilde (~) expansion, similar, but not identical, to that of
  318. `csh'.  The following table shows what unquoted words beginning with a
  319. tilde expand to.
  320.      The current value of `$HOME'.
  321. `~/foo'
  322.      `$HOME/foo'
  323. `~fred/foo'
  324.      The subdirectory `foo' of the home directory of the user `fred'.
  325. `~+/foo'
  326.      `$PWD/foo'
  327.      `$OLDPWD/foo'
  328.    Bash will also tilde expand words following redirection operators
  329. and words following `=' in assignment statements.
  330. File: features.info,  Node: Brace Expansion,  Next: C Shell Builtins,  Prev: Tilde Expansion,  Up: Csh Features
  331. Brace Expansion
  332. ===============
  333.    Brace expansion is a mechanism by which arbitrary strings may be
  334. generated.  This mechanism is similar to PATHNAME EXPANSION (see the
  335. Bash manual page for details), but the file names generated need not
  336. exist.  Patterns to be brace expanded take the form of an optional
  337. PREAMBLE, followed by a series of comma-separated strings between a
  338. pair of braces, followed by an optional POSTAMBLE.  The preamble is
  339. prepended to each string contained within the braces, and the postamble
  340. is then appended to each resulting string, expanding left to right.
  341.    Brace expansions may be nested.  The results of each expanded string
  342. are not sorted; left to right order is preserved.  For example,
  343.      a{d,c,b}e
  344.    expands into ADE ACE ABE.
  345.    Brace expansion is performed before any other expansions, and any
  346. characters special to other expansions are preserved in the result.  It
  347. is strictly textual.  Bash does not apply any syntactic interpretation
  348. to the context of the expansion or the text between the braces.
  349.    A correctly-formed brace expansion must contain unquoted opening and
  350. closing braces, and at least one unquoted comma.  Any incorrectly
  351. formed brace expansion is left unchanged.
  352.    This construct is typically used as shorthand when the common prefix
  353. of the strings to be generated is longer than in the above example:
  354.      mkdir /usr/local/src/bash/{old,new,dist,bugs}
  355.    or
  356.      chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
  357. File: features.info,  Node: C Shell Builtins,  Next: C Shell Variables,  Prev: Brace Expansion,  Up: Csh Features
  358. C Shell Builtins
  359. ================
  360.    Bash has several builtin commands whose definition is very similar
  361. to `csh'.
  362. `pushd'
  363.           pushd [DIR | +N | -N]
  364.      Save the current directory on a list and then `cd' to DIR.  With no
  365.      arguments, exchanges the top two directories.
  366.     `+N'
  367.           Brings the Nth directory (counting from the left of the list
  368.           printed by `dirs') to the top of the list by rotating the
  369.           stack.
  370.     `-N'
  371.           Brings the Nth directory (counting from the right of the list
  372.           printed by `dirs') to the top of the list by rotating the
  373.           stack.
  374.     `DIR'
  375.           Makes the current working directory be the top of the stack,
  376.           and then CDs to DIR.  You can see the saved directory list
  377.           with the `dirs' command.
  378. `popd'
  379.           popd [+N | -N]
  380.      Pops the directory stack, and `cd's to the new top directory.  When
  381.      no arguments are given, removes the top directory from the stack
  382.      and `cd's to the new top directory.  The elements are numbered
  383.      from 0 starting at the first directory listed with `dirs'; i.e.
  384.      `popd' is equivalent to `popd +0'.
  385.     `+N'
  386.           Removes the Nth directory (counting from the left of the list
  387.           printed by `dirs'), starting with zero.
  388.     `-N'
  389.           Removes the Nth directory (counting from the right of the
  390.           list printed by `dirs'), starting with zero.
  391. `dirs'
  392.           dirs [+N | -N] [-L]
  393.      Display the list of currently remembered directories.  Directories
  394.      find their way onto the list with the `pushd' command; you can get
  395.      back up through the list with the `popd' command.
  396.     `+N'
  397.           Displays the Nth directory (counting from the left of the
  398.           list printed by `dirs' when invoked without options), starting
  399.           with zero.
  400.     `-N'
  401.           Displays the Nth directory (counting from the right of the
  402.           list printed by `dirs' when invoked without options), starting
  403.           with zero.
  404.     `-L'
  405.           Produces a longer listing; the default listing format uses a
  406.           tilde to denote the home directory.
  407. `history'
  408.           history [N] [ [-w -r -a -n] [FILENAME]]
  409.      Display the history list with line numbers.  Lines prefixed with
  410.      with a `*' have been modified.  An argument of N says to list only
  411.      the last N lines.  Option `-w' means write out the current history
  412.      to the history file; `-r' means to read the current history file
  413.      and make its contents the history list.  An argument of `-a' means
  414.      to append the new history lines (history lines entered since the
  415.      beginning of the current Bash session) to the history file.
  416.      Finally, the `-n' argument means to read the history lines not
  417.      already read from the history file into the current history list.
  418.      These are lines appended to the history file since the beginning
  419.      of the current Bash session.  If FILENAME is given, then it is used
  420.      as the history file, else if `$HISTFILE' has a value, that is
  421.      used, otherwise `~/.bash_history' is used.
  422. `logout'
  423.      Exit a login shell.
  424. `source'
  425.      A synonym for `.' (*note Bourne Shell Builtins::.)
  426. File: features.info,  Node: C Shell Variables,  Prev: C Shell Builtins,  Up: Csh Features
  427. C Shell Variables
  428. =================
  429. `IGNOREEOF'
  430.      If this variable is set, it represents the number of consecutive
  431.      `EOF's Bash will read before exiting.  By default, Bash will exit
  432.      upon reading a single `EOF'.
  433. `cdable_vars'
  434.      If this variable is set, Bash treats arguments to the `cd' command
  435.      which are not directories as names of variables whose values are
  436.      the directories to change to.
  437. File: features.info,  Node: Korn Shell Features,  Next: Bash Specific Features,  Prev: Csh Features,  Up: Top
  438. Korn Shell Style Features
  439. *************************
  440.    This section describes features primarily inspired by the Korn Shell
  441. (`ksh').  In some cases, the Posix 1003.2 standard has adopted these
  442. commands and variables from the Korn Shell; Bash implements those
  443. features using the Posix standard as a guide.
  444. * Menu:
  445. * Korn Shell Constructs::    Shell grammar constructs adopted from the
  446.                 Korn Shell
  447. * Korn Shell Builtins::        Builtin commands adopted from the Korn Shell.
  448. * Korn Shell Variables::    Variables which bash uses in essentially
  449.                 the same way as the Korn Shell.
  450. * Aliases::            Substituting one command for another.
  451. File: features.info,  Node: Korn Shell Constructs,  Next: Korn Shell Builtins,  Up: Korn Shell Features
  452. Korn Shell Constructs
  453. =====================
  454.    Bash includes the Korn Shell `select' construct.  This construct
  455. allows the easy generation of menus.  It has almost the same syntax as
  456. the `for' command.
  457.    The syntax of the `select' command is:
  458.      select NAME [in WORDS ...]; do COMMANDS; done
  459.    The list of words following `in' is expanded, generating a list of
  460. items.  The set of expanded words is printed on the standard error,
  461. each preceded by a number.  If the "`in WORDS'" is omitted, the
  462. positional parameters are printed.  The `PS3' prompt is then displayed
  463. and a line is read from the standard input. If the line consists of the
  464. number corresponding to one of the displayed words, then the value of
  465. NAME is set to that word.  If the line is empty, the words and prompt
  466. are displayed again.  If `EOF' is read, the `select' command completes.
  467. Any other value read causes NAME to be set to null.  The line read is
  468. saved in the variable `REPLY'.
  469.    The COMMANDS are executed after each selection until a `break' or
  470. `return' command is executed, at which point the `select' command
  471. completes.
  472. File: features.info,  Node: Korn Shell Builtins,  Next: Korn Shell Variables,  Prev: Korn Shell Constructs,  Up: Korn Shell Features
  473. Korn Shell Builtins
  474. ===================
  475.    This section describes Bash builtin commands taken from `ksh'.
  476.           `fc [-e ENAME] [-nlr] [FIRST] [LAST]'
  477.           `fc -s [PAT=REP] [COMMAND]'
  478.      Fix Command.  In the first form, a range of commands from FIRST to
  479.      LAST is selected from the history list.  Both FIRST and LAST may
  480.      be specified as a string (to locate the most recent command
  481.      beginning with that string) or as a number (an index into the
  482.      history list, where a negative number is used as an offset from the
  483.      current command number).  If LAST is not specified it is set to
  484.      FIRST.  If FIRST is not specified it is set to the previous
  485.      command for editing and -16 for listing.  If the `-l' flag is
  486.      given, the commands are listed on standard output.  The `-n' flag
  487.      suppresses the command numbers when listing.  The `-r' flag
  488.      reverses the order of the listing.  Otherwise, the editor given by
  489.      ENAME is invoked on a file containing those commands.  If ENAME is
  490.      not given, the value of the following variable expansion is used:
  491.      `${FCEDIT:-${EDITOR:-vi}}'.  This says to use the value of the
  492.      `FCEDIT' variable if set, or the value of the `EDITOR' variable if
  493.      that is set, or `vi' if neither is set.  When editing is complete,
  494.      the edited commands are echoed and executed.
  495.      In the second form, COMMAND is re-executed after each instance of
  496.      PAT in the selected command is replaced by REP.
  497.      A useful alias to use with the `fc' command is `r='fc -s'', so
  498.      that typing `r cc' runs the last command beginning with `cc' and
  499.      typing `r' re-executes the last command (*note Aliases::.).
  500. `let'
  501.      The `let' builtin allows arithmetic to be performed on shell
  502.      variables.  For details, refer to *Note Arithmetic Builtins::.
  503. `typeset'
  504.      The `typeset' command is supplied for compatibility with the Korn
  505.      shell; however, it has been made obsolete by the `declare' command
  506.      (*note Bash Builtins::.).
  507. File: features.info,  Node: Korn Shell Variables,  Next: Aliases,  Prev: Korn Shell Builtins,  Up: Korn Shell Features
  508. Korn Shell Variables
  509. ====================
  510. `REPLY'
  511.      The default variable for the `read' builtin.
  512. `RANDOM'
  513.      Each time this parameter is referenced, a random integer is
  514.      generated.  Assigning a value to this variable seeds the random
  515.      number generator.
  516. `SECONDS'
  517.      This variable expands to the number of seconds since the shell was
  518.      started.  Assignment to this variable resets the count to the
  519.      value assigned, and the expanded value becomes the value assigned
  520.      plus the number of seconds since the assignment.
  521. `PS3'
  522.      The value of this variable is used as the prompt for the `select'
  523.      command.
  524. `PS4'
  525.      This is the prompt printed before the command line is echoed when
  526.      the `-x' option is set (*note The Set Builtin::.).
  527. `PWD'
  528.      The current working directory as set by the `cd' builtin.
  529. `OLDPWD'
  530.      The previous working directory as set by the `cd' builtin.
  531. `TMOUT'
  532.      If set to a value greater than zero, the value is interpreted as
  533.      the number of seconds to wait for input after issuing the primary
  534.      prompt.  Bash terminates after that number of seconds if input does
  535.      not arrive.
  536. File: features.info,  Node: Aliases,  Prev: Korn Shell Variables,  Up: Korn Shell Features
  537. Aliases
  538. =======
  539. * Menu:
  540. * Alias Builtins::        Builtins commands to maniuplate aliases.
  541.    The shell maintains a list of ALIASES that may be set and unset with
  542. the `alias' and `unalias' builtin commands.
  543.    The first word of each command, if unquoted, is checked to see if it
  544. has an alias.  If so, that word is replaced by the text of the alias.
  545. The alias name and the replacement text may contain any valid shell
  546. input, including shell metacharacters, with the exception that the
  547. alias name may not contain =.  The first word of the replacement text
  548. is tested for aliases, but a word that is identical to an alias being
  549. expanded is not expanded a second time.  This means that one may alias
  550. `ls' to `"ls -F"', for instance, and Bash does not try to recursively
  551. expand the replacement text. If the last character of the alias value
  552. is a space or tab character, then the next command word following the
  553. alias is also checked for alias expansion.
  554.    Aliases are created and listed with the `alias' command, and removed
  555. with the `unalias' command.
  556.    There is no mechanism for using arguments in the replacement text,
  557. as in `csh'.  If arguments are needed, a shell function should be used.
  558.    Aliases are not expanded when the shell is not interactive.
  559.    The rules concerning the definition and use of aliases are somewhat
  560. confusing.  Bash always reads at least one complete line of input
  561. before executing any of the commands on that line.  Aliases are
  562. expanded when a command is read, not when it is executed.  Therefore, an
  563. alias definition appearing on the same line as another command does not
  564. take effect until the next line of input is read.  This means that the
  565. commands following the alias definition on that line are not affected
  566. by the new alias.  This behavior is also an issue when functions are
  567. executed.  Aliases are expanded when the function definition is read,
  568. not when the function is executed, because a function definition is
  569. itself a compound command.  As a consequence, aliases defined in a
  570. function are not available until after that function is executed.  To
  571. be safe, always put alias definitions on a separate line, and do not
  572. use `alias' in compound commands.
  573.    Note that for almost every purpose, aliases are superseded by shell
  574. functions.
  575. File: features.info,  Node: Alias Builtins,  Up: Aliases
  576. Alias Builtins
  577. --------------
  578. `alias'
  579.           alias [NAME[=VALUE] ...]
  580.      Without arguments, print the list of aliases on the standard
  581.      output.  If arguments are supplied, an alias is defined for each
  582.      NAME whose VALUE is given.  If no VALUE is given, the name and
  583.      value of the alias is printed.
  584. `unalias'
  585.           unalias [-a] [NAME ... ]
  586.      Remove each NAME from the list of aliases.  If `-a' is supplied,
  587.      all aliases are removed.
  588. File: features.info,  Node: Bash Specific Features,  Next: Job Control,  Prev: Korn Shell Features,  Up: Top
  589. Bash Specific Features
  590. **********************
  591.    This section describes the features unique to Bash.
  592. * Menu:
  593. * Invoking Bash::        Command line options that you can give
  594.                 to Bash.
  595. * Bash Startup Files::        When and how Bash executes scripts.
  596. * Is This Shell Interactive?::    Determining the state of a running Bash.
  597. * Bash Builtins::        Table of builtins specific to Bash.
  598. * The Set Builtin::        This builtin is so overloaded it
  599.                 deserves its own section.
  600. * Bash Variables::        List of variables that exist in Bash.
  601. * Shell Arithmetic::        Arithmetic on shell variables.
  602. * Printing a Prompt::        Controlling the PS1 string.
  603. File: features.info,  Node: Invoking Bash,  Next: Bash Startup Files,  Up: Bash Specific Features
  604. Invoking Bash
  605. =============
  606.    In addition to the single-character shell command-line options
  607. (*note The Set Builtin::.), there are several multi-character options
  608. that you can use.  These options must appear on the command line before
  609. the single-character options to be recognized.
  610. `-norc'
  611.      Don't read the `~/.bashrc' initialization file in an interactive
  612.      shell.  This is on by default if the shell is invoked as `sh'.
  613. `-rcfile FILENAME'
  614.      Execute commands from FILENAME (instead of `~/.bashrc') in an
  615.      interactive shell.
  616. `-noprofile'
  617.      Don't load the system-wide startup file `/etc/profile' or any of
  618.      the personal initialization files `~/.bash_profile',
  619.      `~/.bash_login', or `~/.profile' when bash is invoked as a login
  620.      shell.
  621. `-version'
  622.      Display the version number of this shell.
  623. `-login'
  624.      Make this shell act as if it were directly invoked from login.
  625.      This is equivalent to `exec - bash' but can be issued from another
  626.      shell, such as `csh'.  If you wanted to replace your current login
  627.      shell with a Bash login shell, you would say `exec bash -login'.
  628. `-nobraceexpansion'
  629.      Do not perform curly brace expansion (*note Brace Expansion::.).
  630. `-nolineediting'
  631.      Do not use the GNU Readline library (*note Command Line Editing::.)
  632.      to read interactive command lines.
  633. `-posix'
  634.      Change the behavior of Bash where the default operation differs
  635.      from the Posix 1003.2 standard to match the standard.  This is
  636.      intended to make Bash behave as a strict superset of that standard.
  637.    There are several single-character options you can give which are
  638. not available with the `set' builtin.
  639. `-c STRING'
  640.      Read and execute commands from STRING after processing the
  641.      options, then exit.
  642.      Force the shell to run interactively.
  643.      If this flag is present, or if no arguments remain after option
  644.      processing, then commands are read from the standard input.  This
  645.      option allows the positional parameters to be set when invoking an
  646.      interactive shell.
  647.    An *interactive* shell is one whose input and output are both
  648. connected to terminals (as determined by `isatty()'), or one started
  649. with the `-i' option.
  650. File: features.info,  Node: Bash Startup Files,  Next: Is This Shell Interactive?,  Prev: Invoking Bash,  Up: Bash Specific Features
  651. Bash Startup Files
  652. ==================
  653.    When and how Bash executes startup files.
  654.      For Login shells (subject to the -noprofile option):
  655.      
  656.          On logging in:
  657.             If `/etc/profile' exists, then source it.
  658.      
  659.             If `~/.bash_profile' exists, then source it,
  660.                else if `~/.bash_login' exists, then source it,
  661.                   else if `~/.profile' exists, then source it.
  662.      
  663.          On logging out:
  664.             If `~/.bash_logout' exists, source it.
  665.      
  666.      For non-login interactive shells (subject to the -norc and -rcfile options):
  667.          On starting up:
  668.             If `~/.bashrc' exists, then source it.
  669.      
  670.      For non-interactive shells:
  671.          On starting up:
  672.             If the environment variable `ENV' is non-null, expand the
  673.             variable and source the file named by the value.  If Bash is
  674.             not started in Posix mode, it looks for `BASH_ENV' before
  675.             `ENV'.
  676.    So, typically, your `~/.bash_profile' contains the line
  677.      `if [ -f `~/.bashrc' ]; then source `~/.bashrc'; fi'
  678. after (or before) any login specific initializations.
  679.    If Bash is invoked as `sh', it tries to mimic the behavior of `sh'
  680. as closely as possible.  For a login shell, it attempts to source only
  681. `/etc/profile' and `~/.profile', in that order.  The `-noprofile'
  682. option may still be used to disable this behavior.  A shell invoked as
  683. `sh' does not attempt to source any other startup files.
  684.    When Bash is started in POSIX mode, as with the `-posix' command
  685. line option, it follows the Posix 1003.2 standard for startup files.
  686. In this mode, the `ENV' variable is expanded and that file sourced; no
  687. other startup files are read.
  688. File: features.info,  Node: Is This Shell Interactive?,  Next: Bash Builtins,  Prev: Bash Startup Files,  Up: Bash Specific Features
  689. Is This Shell Interactive?
  690. ==========================
  691.    You may wish to determine within a startup script whether Bash is
  692. running interactively or not.  To do this, examine the variable `$PS1';
  693. it is unset in non-interactive shells, and set in interactive shells.
  694. Thus:
  695.      if [ -z "$PS1" ]; then
  696.          echo This shell is not interactive
  697.      else
  698.          echo This shell is interactive
  699.      fi
  700.    You can ask an interactive Bash to not run your `~/.bashrc' file
  701. with the `-norc' flag.  You can change the name of the `~/.bashrc' file
  702. to any other file name with `-rcfile FILENAME'.  You can ask Bash to
  703. not run your `~/.bash_profile' file with the `-noprofile' flag.
  704. File: features.info,  Node: Bash Builtins,  Next: The Set Builtin,  Prev: Is This Shell Interactive?,  Up: Bash Specific Features
  705. Bash Builtin Commands
  706. =====================
  707.    This section describes builtin commands which are unique to or have
  708. been extended in Bash.
  709. `builtin'
  710.           builtin [SHELL-BUILTIN [ARGS]]
  711.      Run a shell builtin.  This is useful when you wish to rename a
  712.      shell builtin to be a function, but need the functionality of the
  713.      builtin within the function itself.
  714. `bind'
  715.           bind [-m KEYMAP] [-lvd] [-q NAME]
  716.           bind [-m KEYMAP] -f FILENAME
  717.           bind [-m KEYMAP] KEYSEQ:FUNCTION-NAME
  718.      Display current Readline (*note Command Line Editing::.) key and
  719.      function bindings, or bind a key sequence to a Readline function
  720.      or macro.  The binding syntax accepted is identical to that of
  721.      `.inputrc' (*note Readline Init File::.), but each binding must be
  722.      passed as a separate argument: `"\C-x\C-r":re-read-init-file'.
  723.      Options, if supplied, have the following meanings:
  724.     `-m keymap'
  725.           Use KEYMAP as the keymap to be affected by the subsequent
  726.           bindings.  Acceptable KEYMAP names are `emacs',
  727.           `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move',
  728.           `vi-command', and `vi-insert'.  `vi' is equivalent to
  729.           `vi-command'; `emacs' is equivalent to `emacs-standard'.
  730.     `-l'
  731.           List the names of all readline functions
  732.     `-v'
  733.           List current function names and bindings
  734.     `-d'
  735.           Dump function names and bindings in such a way that they can
  736.           be re-read
  737.     `-f filename'
  738.           Read key bindings from FILENAME
  739.     `-q'
  740.           Query about which keys invoke the named FUNCTION
  741. `command'
  742.           command [-pVv] COMMAND [ARGS ...]
  743.      Runs COMMAND with ARG ignoring shell functions.  If you have a
  744.      shell function called `ls', and you wish to call the command `ls',
  745.      you can say `command ls'.  The `-p' option means to use a default
  746.      value for `$PATH' that is guaranteed to find all of the standard
  747.      utilities.
  748.      If either the `-V' or `-v' option is supplied, a description of
  749.      COMMAND is printed.  The `-v' option causes a single word
  750.      indicating the command or file name used to invoke COMMAND to be
  751.      printed; the `-V' option produces a more verbose description.
  752. `declare'
  753.           declare [-frxi] [NAME[=VALUE]]
  754.      Declare variables and/or give them attributes.  If no NAMEs are
  755.      given, then display the values of variables instead.  `-f' means
  756.      to use function names only.  `-r' says to make NAMEs readonly.
  757.      `-x' says to mark NAMEs for export.  `-i' says that the variable
  758.      is to be treated as an integer; arithmetic evaluation (*note Shell
  759.      Arithmetic::.) is performed when the variable is assigned a value.
  760.      Using `+' instead of `-' turns off the attribute instead.  When
  761.      used in a function, `declare' makes NAMEs local, as with the
  762.      `local' command.
  763. `enable'
  764.           enable [-n] [-a] [NAME ...]
  765.      Enable and disable builtin shell commands.  This allows you to use
  766.      a disk command which has the same name as a shell builtin.  If
  767.      `-n' is used, the NAMEs become disabled.  Otherwise NAMEs are
  768.      enabled.  For example, to use the `test' binary found via `$PATH'
  769.      instead of the shell builtin version, type `enable -n test'.  The
  770.      `-a' option means to list each builtin with an indication of
  771.      whether or not it is enabled.
  772. `help'
  773.           help [PATTERN]
  774.      Display helpful information about builtin commands.  If PATTERN is
  775.      specified, `help' gives detailed help on all commands matching
  776.      PATTERN, otherwise a list of the builtins is printed.
  777. `local'
  778.           local NAME[=VALUE]
  779.      For each argument, create a local variable called NAME, and give
  780.      it VALUE.  `local' can only be used within a function; it makes
  781.      the variable NAME have a visible scope restricted to that function
  782.      and its children.
  783. `type'
  784.           type [-all] [-type | -path] [NAME ...]
  785.      For each NAME, indicate how it would be interpreted if used as a
  786.      command name.
  787.      If the `-type' flag is used, `type' returns a single word which is
  788.      one of "alias", "function", "builtin", "file" or "keyword", if
  789.      NAME is an alias, shell function, shell builtin, disk file, or
  790.      shell reserved word, respectively.
  791.      If the `-path' flag is used, `type' either returns the name of the
  792.      disk file that would be executed, or nothing if `-type' would not
  793.      return "file".
  794.      If the `-all' flag is used, returns all of the places that contain
  795.      an executable named FILE.  This includes aliases and functions, if
  796.      and only if the `-path' flag is not also used.
  797.      `Type' accepts `-a', `-t', and `-p' as equivalent to `-all',
  798.      `-type', and `-path', respectively.
  799. `ulimit'
  800.           ulimit [-acdmstfpnuvSH] [LIMIT]
  801.      `Ulimit' provides control over the resources available to processes
  802.      started by the shell, on systems that allow such control.  If an
  803.      option is given, it is interpreted as follows:
  804.     `-S'
  805.           change and report the soft limit associated with a resource
  806.           (the default if the `-H' option is not given).
  807.     `-H'
  808.           change and report the hard limit associated with a resource.
  809.     `-a'
  810.           all current limits are reported.
  811.     `-c'
  812.           the maximum size of core files created.
  813.     `-d'
  814.           the maximum size of a process's data segment.
  815.     `-m'
  816.           the maximum resident set size.
  817.     `-s'
  818.           the maximum stack size.
  819.     `-t'
  820.           the maximum amount of cpu time in seconds.
  821.     `-f'
  822.           the maximum size of files created by the shell.
  823.     `-p'
  824.           the pipe buffer size.
  825.     `-n'
  826.           the maximum number of open file descriptors.
  827.     `-u'
  828.           the maximum number of processes available to a single user.
  829.     `-v'
  830.           the maximum amount of virtual memory available to the process.
  831.      If LIMIT is given, it is the new value of the specified resource.
  832.      Otherwise, the current value of the specified resource is printed.
  833.      If no option is given, then `-f' is assumed.  Values are in
  834.      1024-byte increments, except for `-t', which is in seconds, `-p',
  835.      which is in units of 512-byte blocks, and `-n' and `-u', which are
  836.      unscaled values.
  837. File: features.info,  Node: The Set Builtin,  Next: Bash Variables,  Prev: Bash Builtins,  Up: Bash Specific Features
  838. The Set Builtin
  839. ===============
  840.    This builtin is so overloaded that it deserves its own section.
  841. `set'
  842.           set [-abefhkmnptuvxldCHP] [-o OPTION] [ARGUMENT ...]
  843.     `-a'
  844.           Mark variables which are modified or created for export.
  845.     `-b'
  846.           Cause the status of terminated background jobs to be reported
  847.           immediately, rather than before printing the next primary
  848.           prompt.
  849.     `-e'
  850.           Exit immediately if a command exits with a non-zero status.
  851.     `-f'
  852.           Disable file name generation (globbing).
  853.     `-h'
  854.           Locate and remember (hash) commands as functions are defined,
  855.           rather than when the function is executed.
  856.     `-k'
  857.           All keyword arguments are placed in the environment for a
  858.           command, not just those that precede the command name.
  859.     `-m'
  860.           Job control is enabled (*note Job Control::.).
  861.     `-n'
  862.           Read commands but do not execute them.
  863.     `-o OPTION-NAME'
  864.           Set the flag corresponding to OPTION-NAME:
  865.          `allexport'
  866.                same as `-a'.
  867.          `braceexpand'
  868.                the shell will perform brace expansion (*note Brace
  869.                Expansion::.).
  870.          `emacs'
  871.                use an emacs-style line editing interface (*note Command
  872.                Line Editing::.).
  873.          `errexit'
  874.                same as `-e'.
  875.          `histexpand'
  876.                same as `-H'.
  877.          `ignoreeof'
  878.                the shell will not exit upon reading EOF.
  879.          `interactive-comments'
  880.                allow a word beginning with a `#' to cause that word and
  881.                all remaining characters on that line to be ignored in an
  882.                interactive shell.
  883.          `monitor'
  884.                same as `-m'.
  885.          `noclobber'
  886.                same as `-C'.
  887.          `noexec'
  888.                same as `-n'.
  889.          `noglob'
  890.                same as `-f'.
  891.          `nohash'
  892.                same as `-d'.
  893.          `notify'
  894.                same as `-b'.
  895.          `nounset'
  896.                same as `-u'.
  897.          `physical'
  898.                same as `-P'.
  899.          `posix'
  900.                change the behavior of Bash where the default operation
  901.                differs from the Posix 1003.2 standard to match the
  902.                standard.  This is intended to make Bash behave as a
  903.                strict superset of that standard.
  904.          `privileged'
  905.                same as `-p'.
  906.          `verbose'
  907.                same as `-v'.
  908.          `vi'
  909.                use a `vi'-style line editing interface.
  910.          `xtrace'
  911.                same as `-x'.
  912.     `-p'
  913.           Turn on privileged mode.  In this mode, the `$ENV' file is
  914.           not processed, and shell functions are not inherited from the
  915.           environment.  This is enabled automatically on startup if the
  916.           effective user (group) id is not equal to the real user
  917.           (group) id.  Turning this option off causes the effective user
  918.           and group ids to be set to the real user and group ids.
  919.     `-t'
  920.           Exit after reading and executing one command.
  921.     `-u'
  922.           Treat unset variables as an error when substituting.
  923.     `-v'
  924.           Print shell input lines as they are read.
  925.     `-x'
  926.           Print commands and their arguments as they are executed.
  927.     `-l'
  928.           Save and restore the binding of the NAME in a `for' command.
  929.     `-d'
  930.           Disable the hashing of commands that are looked up for
  931.           execution.  Normally, commands are remembered in a hash
  932.           table, and once found, do not have to be looked up again.
  933.     `-C'
  934.           Disallow output redirection to existing files.
  935.     `-H'
  936.           Enable ! style history substitution.  This flag is on by
  937.           default.
  938.     `-P'
  939.           If set, do not follow symbolic links when performing commands
  940.           such as `cd' which change the current directory.  The
  941.           physical directory is used instead.
  942.     `--'
  943.           If no arguments follow this flag, then the positional
  944.           parameters are unset.  Otherwise, the positional parameters
  945.           are set to the ARGUMENTS, even if some of them begin with a
  946.           `-'.
  947.     `-'
  948.           Signal the end of options, cause all remaining ARGUMENTS to
  949.           be assigned to the positional parameters.  The `-x' and `-v'
  950.           options are turned off.  If there are no arguments, the
  951.           positional parameters remain unchanged.
  952.      Using `+' rather than `-' causes these flags to be turned off.
  953.      The flags can also be used upon invocation of the shell.  The
  954.      current set of flags may be found in `$-'.  The remaining N
  955.      ARGUMENTS are positional parameters and are assigned, in order, to
  956.      `$1', `$2', ..  `$N'.  If no arguments are given, all shell
  957.      variables are printed.
  958. File: features.info,  Node: Bash Variables,  Next: Shell Arithmetic,  Prev: The Set Builtin,  Up: Bash Specific Features
  959. Bash Variables
  960. ==============
  961.    These variables are set or used by bash, but other shells do not
  962. normally treat them specially.
  963. `HISTCONTROL'
  964. `history_control'
  965.      Set to a value of `ignorespace', it means don't enter lines which
  966.      begin with a space or tab into the history list.  Set to a value
  967.      of `ignoredups', it means don't enter lines which match the last
  968.      entered line.  A value of `ignoreboth' combines the two options.
  969.      Unset, or set to any other value than those above, means to save
  970.      all lines on the history list.
  971. `HISTFILE'
  972.      The name of the file to which the command history is saved.
  973. `HISTSIZE'
  974.      If set, this is the maximum number of commands to remember in the
  975.      history.
  976. `histchars'
  977.      Up to three characters which control history expansion, quick
  978.      substitution, and tokenization (*note History Interaction::.).
  979.      The first character is the "history-expansion-char", that is, the
  980.      character which signifies the start of a history expansion,
  981.      normally `!'.  The second character is the character which
  982.      signifies `quick substitution' when seen as the first character on
  983.      a line, normally `^'.  The optional third character is the
  984.      character which signifies the remainder of the line is a comment,
  985.      when found as the first character of a word, usually `#'.  The
  986.      history comment character causes history substitution to be
  987.      skipped for the remaining words on the line.  It does not
  988.      necessarily cause the shell parser to treat the rest of the line
  989.      as a comment.
  990. `HISTCMD'
  991.      The history number, or index in the history list, of the current
  992.      command.  If `HISTCMD' is unset, it loses its special properties,
  993.      even if it is subsequently reset.
  994. `hostname_completion_file'
  995. `HOSTFILE'
  996.      Contains the name of a file in the same format as `/etc/hosts' that
  997.      should be read when the shell needs to complete a hostname.  You
  998.      can change the file interactively; the next time you attempt to
  999.      complete a hostname, Bash will add the contents of the new file to
  1000.      the already existing database.
  1001. `MAILCHECK'
  1002.      How often (in seconds) that the shell should check for mail in the
  1003.      files specified in `MAILPATH'.
  1004. `PROMPT_COMMAND'
  1005.      If present, this contains a string which is a command to execute
  1006.      before the printing of each primary prompt (`$PS1').
  1007. `UID'
  1008.      The numeric real user id of the current user.
  1009. `EUID'
  1010.      The numeric effective user id of the current user.
  1011. `HOSTTYPE'
  1012.      A string describing the machine Bash is running on.
  1013. `OSTYPE'
  1014.      A string describing the operating system Bash is running on.
  1015. `FIGNORE'
  1016.      A colon-separated list of suffixes to ignore when performing
  1017.      filename completion A file name whose suffix matches one of the
  1018.      entries in `FIGNORE' is excluded from the list of matched file
  1019.      names.  A sample value is `.o:~'
  1020. `INPUTRC'
  1021.      The name of the Readline startup file, overriding the default of
  1022.      `~/.inputrc'.
  1023. `BASH_VERSION'
  1024.      The version number of the current instance of Bash.
  1025. `IGNOREEOF'
  1026.      Controls the action of the shell on receipt of an `EOF' character
  1027.      as the sole input.  If set, then the value of it is the number of
  1028.      consecutive `EOF' characters that can be read as the first
  1029.      characters on an input line before the shell will exit.  If the
  1030.      variable exists but does not have a numeric value (or has no
  1031.      value) then the default is 10.  If the variable does not exist,
  1032.      then `EOF' signifies the end of input to the shell.  This is only
  1033.      in effect for interactive shells.
  1034. `no_exit_on_failed_exec'
  1035.      If this variable exists, the shell will not exit in the case that
  1036.      it couldn't execute the file specified in the `exec' command.
  1037. `nolinks'
  1038.      If present, says not to follow symbolic links when doing commands
  1039.      that change the current working directory.  By default, bash
  1040.      follows the logical chain of directories when performing commands
  1041.      such as `cd' which change the current directory.
  1042.      For example, if `/usr/sys' is a link to `/usr/local/sys' then:
  1043.           $ cd /usr/sys; echo $PWD
  1044.           /usr/sys
  1045.           $ cd ..; pwd
  1046.           /usr
  1047.      If `nolinks' exists, then:
  1048.           $ cd /usr/sys; echo $PWD
  1049.           /usr/local/sys
  1050.           $ cd ..; pwd
  1051.           /usr/local
  1052.      See also the description of the `-P' option to the `set' builtin,
  1053.      *Note The Set Builtin::.
  1054. File: features.info,  Node: Shell Arithmetic,  Next: Printing a Prompt,  Prev: Bash Variables,  Up: Bash Specific Features
  1055. Shell Arithmetic
  1056. ================
  1057. * Menu:
  1058. * Arithmetic Evaluation::    How shell arithmetic works.
  1059. * Arithmetic Expansion::    How to use arithmetic in shell expansions.
  1060. * Arithmetic Builtins::        Builtin commands that use shell arithmetic.
  1061. File: features.info,  Node: Arithmetic Evaluation,  Next: Arithmetic Expansion,  Up: Shell Arithmetic
  1062. Arithmetic Evaluation
  1063. ---------------------
  1064.    The shell allows arithmetic expressions to be evaluated, as one of
  1065. the shell expansions or by the `let' builtin.
  1066.    Evaluation is done in long integers with no check for overflow,
  1067. though division by 0 is trapped and flagged as an error.  The following
  1068. list of operators is grouped into levels of equal-precedence operators.
  1069. The levels are listed in order of decreasing precedence.
  1070. `- +'
  1071.      unary minus and plus
  1072. `! ~'
  1073.      logical and bitwise negation
  1074. `* / %'
  1075.      multiplication, division, remainder
  1076. `+ -'
  1077.      addition, subtraction
  1078. `<< >>'
  1079.      left and right bitwise shifts
  1080. `<= >= < >'
  1081.      comparison
  1082. `== !='
  1083.      equality and inequality
  1084.      bitwise AND
  1085.      bitwise exclusive OR
  1086.      bitwise OR
  1087.      logical AND
  1088.      logical OR
  1089. `= *= /= %= += -= <<= >>= &= ^= |='
  1090.      assignment
  1091.    Shell variables are allowed as operands; parameter expansion is
  1092. performed before the expression is evaluated.  The value of a parameter
  1093. is coerced to a long integer within an expression.  A shell variable
  1094. need not have its integer attribute turned on to be used in an
  1095. expression.
  1096.    Constants with a leading 0 are interpreted as octal numbers.  A
  1097. leading `0x' or `0X' denotes hexadecimal.  Otherwise, numbers take the
  1098. form [BASE#]n, where BASE is a decimal number between 2 and 36
  1099. representing the arithmetic base, and N is a number in that base.  If
  1100. BASE is omitted, then base 10 is used.
  1101.    Operators are evaluated in order of precedence.  Sub-expressions in
  1102. parentheses are evaluated first and may override the precedence rules
  1103. above.
  1104. File: features.info,  Node: Arithmetic Expansion,  Next: Arithmetic Builtins,  Prev: Arithmetic Evaluation,  Up: Shell Arithmetic
  1105. Arithmetic Expansion
  1106. --------------------
  1107.    Arithmetic expansion allows the evaluation of an arithmetic
  1108. expression and the substitution of the result.  There are two formats
  1109. for arithmetic expansion:
  1110.      $[ expression ]
  1111.      $(( expression ))
  1112.    The expression is treated as if it were within double quotes, but a
  1113. double quote inside the braces or parentheses is not treated specially.
  1114. All tokens in the expression undergo parameter expansion, command
  1115. substitution, and quote removal.  Arithmetic substitutions may be
  1116. nested.
  1117.    The evaluation is performed according to the rules listed above.  If
  1118. the expression is invalid, Bash prints a message indicating failure and
  1119. no substitution occurs.
  1120. File: features.info,  Node: Arithmetic Builtins,  Prev: Arithmetic Expansion,  Up: Shell Arithmetic
  1121. Arithmetic Builtins
  1122. -------------------
  1123. `let'
  1124.           let EXPRESSION [EXPRESSION]
  1125.      The `let' builtin allows arithmetic to be performed on shell
  1126.      variables.  Each EXPRESSION is evaluated according to the rules
  1127.      given previously (*note Arithmetic Evaluation::.).  If the last
  1128.      EXPRESSION evaluates to 0, `let' returns 1; otherwise 0 is
  1129.      returned.
  1130. File: features.info,  Node: Printing a Prompt,  Prev: Shell Arithmetic,  Up: Bash Specific Features
  1131. Controlling the Prompt
  1132. ======================
  1133.    The value of the variable `$PROMPT_COMMAND' is examined just before
  1134. Bash prints each primary prompt.  If it is set and non-null, then the
  1135. value is executed just as if you had typed it on the command line.
  1136.    In addition, the following table describes the special characters
  1137. which can appear in the `PS1' variable:
  1138.      the time, in HH:MM:SS format.
  1139.      the date, in "Weekday Month Date" format (e.g. "Tue May 26").
  1140.      newline.
  1141.      the name of the shell, the basename of `$0' (the portion following
  1142.      the final slash).
  1143.      the current working directory.
  1144.      the basename of `$PWD'.
  1145.      your username.
  1146.      the hostname.
  1147.      the command number of this command.
  1148.      the history number of this command.
  1149. `\nnn'
  1150.      the character corresponding to the octal number `nnn'.
  1151.      if the effective uid is 0, `#', otherwise `$'.
  1152.      a backslash.
  1153.      begin a sequence of non-printing characters.  This could be used to
  1154.      embed a terminal control sequence into the prompt.
  1155.      end a sequence of non-printing characters.
  1156. File: features.info,  Node: Job Control,  Next: Using History Interactively,  Prev: Bash Specific Features,  Up: Top
  1157. Job Control
  1158. ***********
  1159.    This chapter disusses what job control is, how it works, and how
  1160. Bash allows you to access its facilities.
  1161. * Menu:
  1162. * Job Control Basics::        How job control works.
  1163. * Job Control Builtins::    Bash builtin commands used to interact
  1164.                 with job control.
  1165. * Job Control Variables::    Variables Bash uses to customize job
  1166.                 control.
  1167. File: features.info,  Node: Job Control Basics,  Next: Job Control Builtins,  Up: Job Control
  1168. Job Control Basics
  1169. ==================
  1170.    Job control refers to the ability to selectively stop (suspend) the
  1171. execution of processes and continue (resume) their execution at a later
  1172. point.  A user typically employs this facility via an interactive
  1173. interface supplied jointly by the system's terminal driver and Bash.
  1174.    The shell associates a JOB with each pipeline.  It keeps a table of
  1175. currently executing jobs, which may be listed with the `jobs' command.
  1176. When Bash starts a job asynchronously (in the background), it prints a
  1177. line that looks like:
  1178.      [1] 25647
  1179.    indicating that this job is job number 1 and that the process ID of
  1180. the last process in the pipeline associated with this job is 25647.
  1181. All of the processes in a single pipeline are members of the same job.
  1182. Bash uses the JOB abstraction as the basis for job control.
  1183.    To facilitate the implementation of the user interface to job
  1184. control, the system maintains the notion of a current terminal process
  1185. group ID.  Members of this process group (processes whose process group
  1186. ID is equal to the current terminal process group ID) receive
  1187. keyboard-generated signals such as `SIGINT'.  These processes are said
  1188. to be in the foreground.  Background processes are those whose process
  1189. group ID differs from the terminal's; such processes are immune to
  1190. keyboard-generated signals.  Only foreground processes are allowed to
  1191. read from or write to the terminal.  Background processes which attempt
  1192. to read from (write to) the terminal are sent a `SIGTTIN' (`SIGTTOU')
  1193. signal by the terminal driver, which, unless caught, suspends the
  1194. process.
  1195.    If the operating system on which Bash is running supports job
  1196. control, Bash allows you to use it.  Typing the SUSPEND character
  1197. (typically `^Z', Control-Z) while a process is running causes that
  1198. process to be stopped and returns you to Bash.  Typing the DELAYED
  1199. SUSPEND character (typically `^Y', Control-Y) causes the process to be
  1200. stopped when it attempts to read input from the terminal, and control to
  1201. be returned to Bash.  You may then manipulate the state of this job,
  1202. using the `bg' command to continue it in the background, the `fg'
  1203. command to continue it in the foreground, or the `kill' command to kill
  1204. it.  A `^Z' takes effect immediately, and has the additional side
  1205. effect of causing pending output and typeahead to be discarded.
  1206.    There are a number of ways to refer to a job in the shell.  The
  1207. character `%' introduces a job name.  Job number `n' may be referred to
  1208. as `%n'.  A job may also be referred to using a prefix of the name used
  1209. to start it, or using a substring that appears in its command line.
  1210. For example, `%ce' refers to a stopped `ce' job. Using `%?ce', on the
  1211. other hand, refers to any job containing the string `ce' in its command
  1212. line.  If the prefix or substring matches more than one job, Bash
  1213. reports an error.  The symbols `%%' and `%+' refer to the shell's
  1214. notion of the current job, which is the last job stopped while it was
  1215. in the foreground.  The previous job may be referenced using `%-'.  In
  1216. output pertaining to jobs (e.g., the output of the `jobs' command), the
  1217. current job is always flagged with a `+', and the previous job with a
  1218.    Simply naming a job can be used to bring it into the foreground:
  1219. `%1' is a synonym for `fg %1' bringing job 1 from the background into
  1220. the foreground.  Similarly, `%1 &' resumes job 1 in the background,
  1221. equivalent to `bg %1'
  1222.    The shell learns immediately whenever a job changes state.
  1223. Normally, Bash waits until it is about to print a prompt before
  1224. reporting changes in a job's status so as to not interrupt any other
  1225. output.  If the the `-b' option to the `set' builtin is set, Bash
  1226. reports such changes immediately (*note The Set Builtin::.).  This
  1227. feature is also controlled by the variable `notify'.
  1228.    If you attempt to exit bash while jobs are stopped, the shell prints
  1229. a message warning you.  You may then use the `jobs' command to inspect
  1230. their status.  If you do this, or try to exit again immediately, you
  1231. are not warned again, and the stopped jobs are terminated.
  1232. File: features.info,  Node: Job Control Builtins,  Next: Job Control Variables,  Prev: Job Control Basics,  Up: Job Control
  1233. Job Control Builtins
  1234. ====================
  1235.           bg [JOBSPEC]
  1236.      Place JOBSPEC into the background, as if it had been started with
  1237.      `&'.  If JOBSPEC is not supplied, the current job is used.
  1238.           fg [JOBSPEC]
  1239.      Bring JOBSPEC into the foreground and make it the current job.  If
  1240.      JOBSPEC is not supplied, the current job is used.
  1241. `jobs'
  1242.           jobs [-lpn] [JOBSPEC]
  1243.           jobs -x COMMAND [JOBSPEC]
  1244.      The first form lists the active jobs.  The `-l' option lists
  1245.      process IDs in addition to the normal information; the `-p' option
  1246.      lists only the process ID of the job's process group leader.  The
  1247.      `-n' option displays only jobs that have changed status since last
  1248.      notfied.  If JOBSPEC is given, output is restricted to information
  1249.      about that job.  If JOBSPEC is not supplied, the status of all
  1250.      jobs is listed.
  1251.      If the `-x' option is supplied, `jobs' replaces any JOBSPEC found
  1252.      in COMMAND or ARGUMENTS with the corresponding process group ID,
  1253.      and executes COMMAND, passing it ARGUMENTs, returning its exit
  1254.      status.
  1255. `suspend'
  1256.           suspend [-f]
  1257.      Suspend the execution of this shell until it receives a `SIGCONT'
  1258.      signal.  The `-f' option means to suspend even if the shell is a
  1259.      login shell.
  1260.    When job control is active, the `kill' and `wait' builtins also
  1261. accept JOBSPEC arguments.
  1262. File: features.info,  Node: Job Control Variables,  Prev: Job Control Builtins,  Up: Job Control
  1263. Job Control Variables
  1264. =====================
  1265. `auto_resume'
  1266.      This variable controls how the shell interacts with the user and
  1267.      job control.  If this variable exists then single word simple
  1268.      commands without redirects are treated as candidates for resumption
  1269.      of an existing job.  There is no ambiguity allowed; if you have
  1270.      more than one job beginning with the string that you have typed,
  1271.      then the most recently accessed job will be selected.  The name of
  1272.      a stopped job, in this context, is the command line used to start
  1273.      it.  If this variable is set to the value `exact', the string
  1274.      supplied must match the name of a stopped job exactly; if set to
  1275.      `substring', the string supplied needs to match a substring of the
  1276.      name of a stopped job.  The `substring' value provides
  1277.      functionality analogous to the `%?' job id (*note Job Control
  1278.      Basics::.).  If set to any other value, the supplied string must
  1279.      be a prefix of a stopped job's name; this provides functionality
  1280.      analogous to the `%' job id.
  1281. `notify'
  1282.      Setting this variable to a value is equivalent to `set -b';
  1283.      unsetting it is equivalent to `set +b' (*note The Set Builtin::.).
  1284. File: features.info,  Node: Using History Interactively,  Next: Command Line Editing,  Prev: Job Control,  Up: Top
  1285. Using History Interactively
  1286. ***************************
  1287.    This chapter describes how to use the GNU History Library
  1288. interactively, from a user's standpoint.  It should be considered a
  1289. user's guide.  For information on using the GNU History Library in your
  1290. own programs, see the GNU Readline Library Manual.
  1291. * Menu:
  1292. * History Interaction::        What it feels like using History as a user.
  1293. File: features.info,  Node: History Interaction,  Up: Using History Interactively
  1294. History Interaction
  1295. ===================
  1296.    The History library provides a history expansion feature that is
  1297. similar to the history expansion provided by `csh'.  The following text
  1298. describes the syntax used to manipulate the history information.
  1299.    History expansion takes place in two parts.  The first is to
  1300. determine which line from the previous history should be used during
  1301. substitution.  The second is to select portions of that line for
  1302. inclusion into the current one.  The line selected from the previous
  1303. history is called the "event", and the portions of that line that are
  1304. acted upon are called "words".  The line is broken into words in the
  1305. same fashion that Bash does, so that several English (or Unix) words
  1306. surrounded by quotes are considered as one word.
  1307. * Menu:
  1308. * Event Designators::    How to specify which history line to use.
  1309. * Word Designators::    Specifying which words are of interest.
  1310. * Modifiers::        Modifying the results of substitution.
  1311. File: features.info,  Node: Event Designators,  Next: Word Designators,  Up: History Interaction
  1312. Event Designators
  1313. -----------------
  1314.    An event designator is a reference to a command line entry in the
  1315. history list.
  1316.      Start a history substitution, except when followed by a space, tab,
  1317.      the end of the line, = or (.
  1318.      Refer to the previous command.  This is a synonym for `!-1'.
  1319.      Refer to command line N.
  1320. `!-n'
  1321.      Refer to the command N lines back.
  1322. `!string'
  1323.      Refer to the most recent command starting with STRING.
  1324. `!?string'[`?']
  1325.      Refer to the most recent command containing STRING.
  1326.      The entire command line typed so far.
  1327. `^string1^string2^'
  1328.      Quick Substitution.  Repeat the last command, replacing STRING1
  1329.      with STRING2.  Equivalent to `!!:s/string1/string2/'.
  1330. File: features.info,  Node: Word Designators,  Next: Modifiers,  Prev: Event Designators,  Up: History Interaction
  1331. Word Designators
  1332. ----------------
  1333.    A : separates the event specification from the word designator.  It
  1334. can be omitted if the word designator begins with a ^, $, * or %.
  1335. Words are numbered from the beginning of the line, with the first word
  1336. being denoted by a 0 (zero).
  1337. `0 (zero)'
  1338.      The `0'th word.  For many applications, this is the command word.
  1339.      The Nth word.
  1340.      The first argument;  that is, word 1.
  1341.      The last argument.
  1342.      The word matched by the most recent `?string?' search.
  1343. `x-y'
  1344.      A range of words; `-Y' abbreviates `0-Y'.
  1345.      All of the words, except the `0'th.  This is a synonym for `1-$'.
  1346.      It is not an error to use * if there is just one word in the event;
  1347.      the empty string is returned in that case.
  1348.      Abbreviates `x-$'
  1349.      Abbreviates `x-$' like `x*', but omits the last word.
  1350. File: features.info,  Node: Modifiers,  Prev: Word Designators,  Up: History Interaction
  1351. Modifiers
  1352. ---------
  1353.    After the optional word designator, you can add a sequence of one or
  1354. more of the following modifiers, each preceded by a :.
  1355.      Remove a trailing pathname component, leaving only the head.
  1356.      Remove a trailing suffix of the form `.'SUFFIX, leaving the
  1357.      basename.
  1358.      Remove all but the trailing suffix.
  1359.      Remove all leading  pathname  components, leaving the tail.
  1360.      Print the new command but do not execute it.
  1361.      Quote the substituted words, escaping further substitutions.
  1362.      Quote the substituted words as with `q', but break into words at
  1363.      spaces, tabs, and newlines.
  1364. `s/old/new/'
  1365.      Substitute NEW for the first occurrence of OLD in the event line.
  1366.      Any delimiter may be used in place of /.  The delimiter may be
  1367.      quoted in OLD and NEW with a single backslash.  If & appears in
  1368.      NEW, it is replaced by OLD.  A single backslash will quote the &.
  1369.      The final delimiter is optional if it is the last character on the
  1370.      input line.
  1371.      Repeat the previous substitution.
  1372.      Cause changes to be applied over the entire event line.  Used in
  1373.      conjunction with `s', as in `gs/old/new/', or with `&'.
  1374. File: features.info,  Node: Command Line Editing,  Next: Variable Index,  Prev: Using History Interactively,  Up: Top
  1375. Command Line Editing
  1376. ********************
  1377.    This chapter describes the basic features of the GNU command line
  1378. editing interface.
  1379. * Menu:
  1380. * Introduction and Notation::    Notation used in this text.
  1381. * Readline Interaction::    The minimum set of commands for editing a line.
  1382. * Readline Init File::        Customizing Readline from a user's view.
  1383. * Bindable Readline Commands::    A description of most of the Readline commands
  1384.                 available for binding
  1385. * Readline vi Mode::        A short description of how to make Readline
  1386.                 behave like the vi editor.
  1387. File: features.info,  Node: Introduction and Notation,  Next: Readline Interaction,  Up: Command Line Editing
  1388. Introduction to Line Editing
  1389. ============================
  1390.    The following paragraphs describe the notation used to represent
  1391. keystrokes.
  1392.    The text C-k is read as `Control-K' and describes the character
  1393. produced when the Control key is depressed and the k key is struck.
  1394.    The text M-k is read as `Meta-K' and describes the character
  1395. produced when the meta key (if you have one) is depressed, and the k
  1396. key is struck.  If you do not have a meta key, the identical keystroke
  1397. can be generated by typing ESC first, and then typing k.  Either
  1398. process is known as "metafying" the k key.
  1399.    The text M-C-k is read as `Meta-Control-k' and describes the
  1400. character produced by "metafying" C-k.
  1401.    In addition, several keys have their own names.  Specifically, DEL,
  1402. ESC, LFD, SPC, RET, and TAB all stand for themselves when seen in this
  1403. text, or in an init file (*note Readline Init File::., for more info).
  1404. File: features.info,  Node: Readline Interaction,  Next: Readline Init File,  Prev: Introduction and Notation,  Up: Command Line Editing
  1405. Readline Interaction
  1406. ====================
  1407.    Often during an interactive session you type in a long line of text,
  1408. only to notice that the first word on the line is misspelled.  The
  1409. Readline library gives you a set of commands for manipulating the text
  1410. as you type it in, allowing you to just fix your typo, and not forcing
  1411. you to retype the majority of the line.  Using these editing commands,
  1412. you move the cursor to the place that needs correction, and delete or
  1413. insert the text of the corrections.  Then, when you are satisfied with
  1414. the line, you simply press RETURN.  You do not have to be at the end of
  1415. the line to press RETURN; the entire line is accepted regardless of the
  1416. location of the cursor within the line.
  1417. * Menu:
  1418. * Readline Bare Essentials::    The least you need to know about Readline.
  1419. * Readline Movement Commands::    Moving about the input line.
  1420. * Readline Killing Commands::    How to delete text, and how to get it back!
  1421. * Readline Arguments::        Giving numeric arguments to commands.
  1422. File: features.info,  Node: Readline Bare Essentials,  Next: Readline Movement Commands,  Up: Readline Interaction
  1423. Readline Bare Essentials
  1424. ------------------------
  1425.    In order to enter characters into the line, simply type them.  The
  1426. typed character appears where the cursor was, and then the cursor moves
  1427. one space to the right.  If you mistype a character, you can use your
  1428. erase character to back up and delete the mistyped character.
  1429.    Sometimes you may miss typing a character that you wanted to type,
  1430. and not notice your error until you have typed several other
  1431. characters.  In that case, you can type C-b to move the cursor to the
  1432. left, and then correct your mistake.  Afterwards, you can move the
  1433. cursor to the right with C-f.
  1434.    When you add text in the middle of a line, you will notice that
  1435. characters to the right of the cursor are `pushed over' to make room
  1436. for the text that you have inserted.  Likewise, when you delete text
  1437. behind the cursor, characters to the right of the cursor are `pulled
  1438. back' to fill in the blank space created by the removal of the text.  A
  1439. list of the basic bare essentials for editing the text of an input line
  1440. follows.
  1441.      Move back one character.
  1442.      Move forward one character.
  1443.      Delete the character to the left of the cursor.
  1444.      Delete the character underneath the cursor.
  1445. Printing characters
  1446.      Insert the character into the line at the cursor.
  1447.      Undo the last thing that you did.  You can undo all the way back
  1448.      to an empty line.
  1449. File: features.info,  Node: Readline Movement Commands,  Next: Readline Killing Commands,  Prev: Readline Bare Essentials,  Up: Readline Interaction
  1450. Readline Movement Commands
  1451. --------------------------
  1452.    The above table describes the most basic possible keystrokes that
  1453. you need in order to do editing of the input line.  For your
  1454. convenience, many other commands have been added in addition to C-b,
  1455. C-f, C-d, and DEL.  Here are some commands for moving more rapidly
  1456. about the line.
  1457.      Move to the start of the line.
  1458.      Move to the end of the line.
  1459.      Move forward a word.
  1460.      Move backward a word.
  1461.      Clear the screen, reprinting the current line at the top.
  1462.    Notice how C-f moves forward a character, while M-f moves forward a
  1463. word.  It is a loose convention that control keystrokes operate on
  1464. characters while meta keystrokes operate on words.
  1465. File: features.info,  Node: Readline Killing Commands,  Next: Readline Arguments,  Prev: Readline Movement Commands,  Up: Readline Interaction
  1466. Readline Killing Commands
  1467. -------------------------
  1468.    "Killing" text means to delete the text from the line, but to save
  1469. it away for later use, usually by "yanking" (re-inserting) it back into
  1470. the line.  If the description for a command says that it `kills' text,
  1471. then you can be sure that you can get the text back in a different (or
  1472. the same) place later.
  1473.    When you use a kill command, the text is saved in a "kill-ring".
  1474. Any number of consecutive kills save all of the killed text together, so
  1475. that when you yank it back, you get it all.  The kill ring is not line
  1476. specific; the text that you killed on a previously typed line is
  1477. available to be yanked back later, when you are typing another line.
  1478.    Here is the list of commands for killing text.
  1479.      Kill the text from the current cursor position to the end of the
  1480.      line.
  1481.      Kill from the cursor to the end of the current word, or if between
  1482.      words, to the end of the next word.
  1483. M-DEL
  1484.      Kill from the cursor the start of the previous word, or if between
  1485.      words, to the start of the previous word.
  1486.      Kill from the cursor to the previous whitespace.  This is
  1487.      different than M-DEL because the word boundaries differ.
  1488.    And, here is how to "yank" the text back into the line.  Yanking
  1489. means to copy the most-recently-killed text from the kill buffer.
  1490.      Yank the most recently killed text back into the buffer at the
  1491.      cursor.
  1492.      Rotate the kill-ring, and yank the new top.  You can only do this
  1493.      if the prior command is C-y or M-y.
  1494. File: features.info,  Node: Readline Arguments,  Prev: Readline Killing Commands,  Up: Readline Interaction
  1495. Readline Arguments
  1496. ------------------
  1497.    You can pass numeric arguments to Readline commands.  Sometimes the
  1498. argument acts as a repeat count, other times it is the sign of the
  1499. argument that is significant.  If you pass a negative argument to a
  1500. command which normally acts in a forward direction, that command will
  1501. act in a backward direction.  For example, to kill text back to the
  1502. start of the line, you might type M- C-k.
  1503.    The general way to pass numeric arguments to a command is to type
  1504. meta digits before the command.  If the first `digit' you type is a
  1505. minus sign (-), then the sign of the argument will be negative.  Once
  1506. you have typed one meta digit to get the argument started, you can type
  1507. the remainder of the digits, and then the command.  For example, to give
  1508. the C-d command an argument of 10, you could type M-1 0 C-d.
  1509. File: features.info,  Node: Readline Init File,  Next: Bindable Readline Commands,  Prev: Readline Interaction,  Up: Command Line Editing
  1510. Readline Init File
  1511. ==================
  1512.    Although the Readline library comes with a set of Emacs-like
  1513. keybindings installed by default, it is possible that you would like to
  1514. use a different set of keybindings.  You can customize programs that
  1515. use Readline by putting commands in an "init" file in your home
  1516. directory.  The name of this file is taken from the value of the shell
  1517. variable `INPUTRC'.  If that variable is unset, the default is
  1518. `~/.inputrc'.
  1519.    When a program which uses the Readline library starts up, the init
  1520. file is read, and the key bindings are set.
  1521.    In addition, the `C-x C-r' command re-reads this init file, thus
  1522. incorporating any changes that you might have made to it.
  1523. * Menu:
  1524. * Readline Init Syntax::    Syntax for the commands in the inputrc file.
  1525. * Conditional Init Constructs::    Conditional key bindings in the inputrc file.
  1526. File: features.info,  Node: Readline Init Syntax,  Next: Conditional Init Constructs,  Up: Readline Init File
  1527. Readline Init Syntax
  1528. --------------------
  1529.    There are only a few basic constructs allowed in the Readline init
  1530. file.  Blank lines are ignored.  Lines beginning with a # are comments.
  1531. Lines beginning with a $ indicate conditional constructs (*note
  1532. Conditional Init Constructs::.).  Other lines denote variable settings
  1533. and key bindings.
  1534. Variable Settings
  1535.      You can change the state of a few variables in Readline by using
  1536.      the `set' command within the init file.  Here is how you would
  1537.      specify that you wish to use `vi' line editing commands:
  1538.           set editing-mode vi
  1539.      Right now, there are only a few variables which can be set; so
  1540.      few, in fact, that we just list them here:
  1541.     `editing-mode'
  1542.           The `editing-mode' variable controls which editing mode you
  1543.           are using.  By default, Readline starts up in Emacs editing
  1544.           mode, where the keystrokes are most similar to Emacs.  This
  1545.           variable can be set to either `emacs' or `vi'.
  1546.     `horizontal-scroll-mode'
  1547.           This variable can be set to either `On' or `Off'.  Setting it
  1548.           to `On' means that the text of the lines that you edit will
  1549.           scroll horizontally on a single screen line when they are
  1550.           longer than the width of the screen, instead of wrapping onto
  1551.           a new screen line.  By default, this variable is set to `Off'.
  1552.     `mark-modified-lines'
  1553.           This variable, when set to `On', says to display an asterisk
  1554.           (`*') at the start of history lines which have been modified.
  1555.           This variable is `off' by default.
  1556.     `bell-style'
  1557.           Controls what happens when Readline wants to ring the
  1558.           terminal bell.  If set to `none', Readline never rings the
  1559.           bell.  If set to `visible', Readline uses a visible bell if
  1560.           one is available.  If set to `audible' (the default),
  1561.           Readline attempts to ring the terminal's bell.
  1562.     `comment-begin'
  1563.           The string to insert at the beginning of the line when the
  1564.           `vi-comment' command is executed.  The default value is `"#"'.
  1565.     `meta-flag'
  1566.           If set to `on', Readline will enable eight-bit input (it will
  1567.           not strip the eighth bit from the characters it reads),
  1568.           regardless of what the terminal claims it can support.  The
  1569.           default value is `off'.
  1570.     `convert-meta'
  1571.           If set to `on', Readline will convert characters with the
  1572.           eigth bit set to an ASCII key sequence by stripping the eigth
  1573.           bit and prepending an ESC character, converting them to a
  1574.           meta-prefixed key sequence.  The default value is `on'.
  1575.     `output-meta'
  1576.           If set to `on', Readline will display characters with the
  1577.           eighth bit set directly rather than as a meta-prefixed escape
  1578.           sequence.  The default is `off'.
  1579.     `completion-query-items'
  1580.           The number of possible completions that determines when the
  1581.           user is asked whether he wants to see the list of
  1582.           possibilities.  If the number of possible completions is
  1583.           greater than this value, Readline will ask the user whether
  1584.           or not he wishes to view them; otherwise, they are simply
  1585.           listed.  The default limit is `100'.
  1586.     `keymap'
  1587.           Sets Readline's idea of the current keymap for key binding
  1588.           commands.  Acceptable `keymap' names are `emacs',
  1589.           `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move',
  1590.           `vi-command', and `vi-insert'.  `vi' is equivalent to
  1591.           `vi-command'; `emacs' is equivalent to `emacs-standard'.  The
  1592.           default value is `emacs'.  The value of the `editing-mode'
  1593.           variable also affects the default keymap.
  1594.     `show-all-if-ambiguous'
  1595.           This alters the default behavior of the completion functions.
  1596.           If set to `on', words which have more than one possible
  1597.           completion cause the matches to be listed immediately instead
  1598.           of ringing the bell.  The default value is `off'.
  1599.     `expand-tilde'
  1600.           If set to `on', tilde expansion is performed when Readline
  1601.           attempts word completion.  The default is `off'.
  1602. Key Bindings
  1603.      The syntax for controlling key bindings in the init file is
  1604.      simple.  First you have to know the name of the command that you
  1605.      want to change.  The following pages contain tables of the command
  1606.      name, the default keybinding, and a short description of what the
  1607.      command does.
  1608.      Once you know the name of the command, simply place the name of
  1609.      the key you wish to bind the command to, a colon, and then the
  1610.      name of the command on a line in the init file.  The name of the
  1611.      key can be expressed in different ways, depending on which is most
  1612.      comfortable for you.
  1613.     KEYNAME: FUNCTION-NAME or MACRO
  1614.           KEYNAME is the name of a key spelled out in English.  For
  1615.           example:
  1616.                Control-u: universal-argument
  1617.                Meta-Rubout: backward-kill-word
  1618.                Control-o: ">&output"
  1619.           In the above example, `C-u' is bound to the function
  1620.           `universal-argument', and `C-o' is bound to run the macro
  1621.           expressed on the right hand side (that is, to insert the text
  1622.           `>&output' into the line).
  1623.     "KEYSEQ": FUNCTION-NAME or MACRO
  1624.           KEYSEQ differs from KEYNAME above in that strings denoting an
  1625.           entire key sequence can be specified, by placing the key
  1626.           sequence in double quotes.  Some GNU Emacs style key escapes
  1627.           can be used, as in the following example, but the special
  1628.           character names are not recognized.
  1629.                "\C-u": universal-argument
  1630.                "\C-x\C-r": re-read-init-file
  1631.                "\e[11~": "Function Key 1"
  1632.           In the above example, `C-u' is bound to the function
  1633.           `universal-argument' (just as it was in the first example),
  1634.           `C-x C-r' is bound to the function `re-read-init-file', and
  1635.           `ESC [ 1 1 ~' is bound to insert the text `Function Key 1'.
  1636.           The following escape sequences are available when specifying
  1637.           key sequences:
  1638.          ``\C-''
  1639.                control prefix
  1640.          ``\M-''
  1641.                meta prefix
  1642.          ``\e''
  1643.                an escape character
  1644.          ``\\''
  1645.                backslash
  1646.          ``\"''
  1647.                "
  1648.          ``\'''
  1649.                '
  1650.           When entering the text of a macro, single or double quotes
  1651.           should be used to indicate a macro definition.  Unquoted text
  1652.           is assumed to be a function name.  Backslash will quote any
  1653.           character in the macro text, including " and '.  For example,
  1654.           the following binding will make `C-x \' insert a single \
  1655.           into the line:
  1656.                "\C-x\\": "\\"
  1657. File: features.info,  Node: Conditional Init Constructs,  Prev: Readline Init Syntax,  Up: Readline Init File
  1658. Conditional Init Constructs
  1659. ---------------------------
  1660.    Readline implements a facility similar in spirit to the conditional
  1661. compilation features of the C preprocessor which allows key bindings
  1662. and variable settings to be performed as the result of tests.  There
  1663. are three parser directives used.
  1664. `$if'
  1665.      The `$if' construct allows bindings to be made based on the
  1666.      editing mode, the terminal being used, or the application using
  1667.      Readline.  The text of the test extends to the end of the line; no
  1668.      characters are required to isolate it.
  1669.     `mode'
  1670.           The `mode=' form of the `$if' directive is used to test
  1671.           whether Readline is in `emacs' or `vi' mode.  This may be
  1672.           used in conjunction with the `set keymap' command, for
  1673.           instance, to set bindings in the `emacs-standard' and
  1674.           `emacs-ctlx' keymaps only if Readline is starting out in
  1675.           `emacs' mode.
  1676.     `term'
  1677.           The `term=' form may be used to include terminal-specific key
  1678.           bindings, perhaps to bind the key sequences output by the
  1679.           terminal's function keys.  The word on the right side of the
  1680.           `=' is tested against the full name of the terminal and the
  1681.           portion of the terminal name before the first `-'.  This
  1682.           allows SUN to match both SUN and SUN-CMD, for instance.
  1683.     `application'
  1684.           The APPLICATION construct is used to include
  1685.           application-specific settings.  Each program using the
  1686.           Readline library sets the APPLICATION NAME, and you can test
  1687.           for it.  This could be used to bind key sequences to
  1688.           functions useful for a specific program.  For instance, the
  1689.           following command adds a key sequence that quotes the current
  1690.           or previous word in Bash:
  1691.                $if bash
  1692.                # Quote the current or previous word
  1693.                "\C-xq": "\eb\"\ef\""
  1694.                $endif
  1695. `$endif'
  1696.      This command, as you saw in the previous example, terminates an
  1697.      `$if' command.
  1698. `$else'
  1699.      Commands in this branch of the `$if' directive are executed if the
  1700.      test fails.
  1701. File: features.info,  Node: Bindable Readline Commands,  Next: Readline vi Mode,  Prev: Readline Init File,  Up: Command Line Editing
  1702. Bindable Readline Commands
  1703. ==========================
  1704. * Menu:
  1705. * Commands For Moving::        Moving about the line.
  1706. * Commands For History::    Getting at previous lines.
  1707. * Commands For Text::        Commands for changing text.
  1708. * Commands For Killing::    Commands for killing and yanking.
  1709. * Numeric Arguments::        Specifying numeric arguments, repeat counts.
  1710. * Commands For Completion::    Getting Readline to do the typing for you.
  1711. * Keyboard Macros::        Saving and re-executing typed characters
  1712. * Miscellaneous Commands::    Other miscellaneous commands.
  1713. File: features.info,  Node: Commands For Moving,  Next: Commands For History,  Up: Bindable Readline Commands
  1714. Commands For Moving
  1715. -------------------
  1716. `beginning-of-line (C-a)'
  1717.      Move to the start of the current line.
  1718. `end-of-line (C-e)'
  1719.      Move to the end of the line.
  1720. `forward-char (C-f)'
  1721.      Move forward a character.
  1722. `backward-char (C-b)'
  1723.      Move back a character.
  1724. `forward-word (M-f)'
  1725.      Move forward to the end of the next word.  Words are composed of
  1726.      letters and digits.
  1727. `backward-word (M-b)'
  1728.      Move back to the start of this, or the previous, word.  Words are
  1729.      composed of letters and digits.
  1730. `clear-screen (C-l)'
  1731.      Clear the screen and redraw the current line, leaving the current
  1732.      line at the top of the screen.
  1733. `redraw-current-line ()'
  1734.      Refresh the current line.  By default, this is unbound.
  1735. File: features.info,  Node: Commands For History,  Next: Commands For Text,  Prev: Commands For Moving,  Up: Bindable Readline Commands
  1736. Commands For Manipulating The History
  1737. -------------------------------------
  1738. `accept-line (Newline, Return)'
  1739.      Accept the line regardless of where the cursor is.  If this line is
  1740.      non-empty, add it to the history list according to the setting of
  1741.      the `HISTCONTROL' variable.  If this line was a history line, then
  1742.      restore the history line to its original state.
  1743. `previous-history (C-p)'
  1744.      Move `up' through the history list.
  1745. `next-history (C-n)'
  1746.      Move `down' through the history list.
  1747. `beginning-of-history (M-<)'
  1748.      Move to the first line in the history.
  1749. `end-of-history (M->)'
  1750.      Move to the end of the input history, i.e., the line you are
  1751.      entering.
  1752. `reverse-search-history (C-r)'
  1753.      Search backward starting at the current line and moving `up'
  1754.      through the history as necessary.  This is an incremental search.
  1755. `forward-search-history (C-s)'
  1756.      Search forward starting at the current line and moving `down'
  1757.      through the the history as necessary.  This is an incremental
  1758.      search.
  1759. `non-incremental-reverse-search-history (M-p)'
  1760.      Search backward starting at the current line and moving `up'
  1761.      through the history as necessary using a non-incremental search
  1762.      for a string supplied by the user.
  1763. `non-incremental-forward-search-history (M-n)'
  1764.      Search forward starting at the current line and moving `down'
  1765.      through the the history as necessary using a non-incremental search
  1766.      for a string supplied by the user.
  1767. `history-search-forward ()'
  1768.      Search forward through the history for the string of characters
  1769.      between the start of the current line and the current point.  This
  1770.      is a non-incremental search.  By default, this command is unbound.
  1771. `history-search-backward ()'
  1772.      Search backward through the history for the string of characters
  1773.      between the start of the current line and the current point.  This
  1774.      is a non-incremental search.  By default, this command is unbound.
  1775. `yank-nth-arg (M-C-y)'
  1776.      Insert the first argument to the previous command (usually the
  1777.      second word on the previous line).  With an argument N, insert the
  1778.      Nth word from the previous command (the words in the previous
  1779.      command begin with word 0).  A negative argument inserts the Nth
  1780.      word from the end of the previous command.
  1781. `yank-last-arg (M-., M-_)'
  1782.      Insert last argument to the previous command (the last word on the
  1783.      previous line).  With an argument, behave exactly like
  1784.      `yank-nth-arg'.
  1785. File: features.info,  Node: Commands For Text,  Next: Commands For Killing,  Prev: Commands For History,  Up: Bindable Readline Commands
  1786. Commands For Changing Text
  1787. --------------------------
  1788. `delete-char (C-d)'
  1789.      Delete the character under the cursor.  If the cursor is at the
  1790.      beginning of the line, there are no characters in the line, and
  1791.      the last character typed was not C-d, then return EOF.
  1792. `backward-delete-char (Rubout)'
  1793.      Delete the character behind the cursor.  A numeric arg says to kill
  1794.      the characters instead of deleting them.
  1795. `quoted-insert (C-q, C-v)'
  1796.      Add the next character that you type to the line verbatim.  This is
  1797.      how to insert key sequences like C-q, for example.
  1798. `tab-insert (M-TAB)'
  1799.      Insert a tab character.
  1800. `self-insert (a, b, A, 1, !, ...)'
  1801.      Insert yourself.
  1802. `transpose-chars (C-t)'
  1803.      Drag the character before the cursor forward over the character at
  1804.      the cursor, moving the cursor forward as well.  If the insertion
  1805.      point is at the end of the line, then this transposes the last two
  1806.      characters of the line.  Negative argumentss don't work.
  1807. `transpose-words (M-t)'
  1808.      Drag the word behind the cursor past the word in front of the
  1809.      cursor moving the cursor over that word as well.
  1810. `upcase-word (M-u)'
  1811.      Uppercase the current (or following) word.  With a negative
  1812.      argument, do the previous word, but do not move the cursor.
  1813. `downcase-word (M-l)'
  1814.      Lowercase the current (or following) word.  With a negative
  1815.      argument, do the previous word, but do not move the cursor.
  1816. `capitalize-word (M-c)'
  1817.      Capitalize the current (or following) word.  With a negative
  1818.      argument, do the previous word, but do not move the cursor.
  1819. File: features.info,  Node: Commands For Killing,  Next: Numeric Arguments,  Prev: Commands For Text,  Up: Bindable Readline Commands
  1820. Killing And Yanking
  1821. -------------------
  1822. `kill-line (C-k)'
  1823.      Kill the text from the current cursor position to the end of the
  1824.      line.
  1825. `backward-kill-line (C-x Rubout)'
  1826.      Kill backward to the beginning of the line.
  1827. `unix-line-discard (C-u)'
  1828.      Kill backward from the cursor to the beginning of the current line.
  1829.      Save the killed text on the kill-ring.
  1830. `kill-whole-line ()'
  1831.      Kill all characters on the current line, no matter where the
  1832.      cursor is.  By default, this is unbound.
  1833. `kill-word (M-d)'
  1834.      Kill from the cursor to the end of the current word, or if between
  1835.      words, to the end of the next word.  Word boundaries are the same
  1836.      as `forward-word'.
  1837. `backward-kill-word (M-DEL)'
  1838.      Kill the word behind the cursor.  Word boundaries are the same as
  1839.      `backward-word'.
  1840. `unix-word-rubout (C-w)'
  1841.      Kill the word behind the cursor, using white space as a word
  1842.      boundary.  The killed text is saved on the kill-ring.
  1843. `delete-horizontal-space ()'
  1844.      Delete all spaces and tabs around point.  By default, this is
  1845.      unbound.
  1846. `yank (C-y)'
  1847.      Yank the top of the kill ring into the buffer at the current
  1848.      cursor position.
  1849. `yank-pop (M-y)'
  1850.      Rotate the kill-ring, and yank the new top.  You can only do this
  1851.      if the prior command is yank or yank-pop.
  1852. File: features.info,  Node: Numeric Arguments,  Next: Commands For Completion,  Prev: Commands For Killing,  Up: Bindable Readline Commands
  1853. Specifying Numeric Arguments
  1854. ----------------------------
  1855. `digit-argument (M-0, M-1, ... M--)'
  1856.      Add this digit to the argument already accumulating, or start a new
  1857.      argument.  M- starts a negative argument.
  1858. `universal-argument ()'
  1859.      Each time this is executed, the argument count is multiplied by
  1860.      four.  The argument count is initially one, so executing this
  1861.      function the first time makes the argument count four.  By
  1862.      default, this is not bound to a key.
  1863. File: features.info,  Node: Commands For Completion,  Next: Keyboard Macros,  Prev: Numeric Arguments,  Up: Bindable Readline Commands
  1864. Letting Readline Type For You
  1865. -----------------------------
  1866. `complete (TAB)'
  1867.      Attempt to do completion on the text before the cursor.  This is
  1868.      application-specific.  Generally, if you are typing a filename
  1869.      argument, you can do filename completion; if you are typing a
  1870.      command, you can do command completion, if you are typing in a
  1871.      symbol to GDB, you can do symbol name completion, if you are
  1872.      typing in a variable to Bash, you can do variable name completion,
  1873.      and so on.  See the Bash manual page for a complete list of
  1874.      available completion functions.
  1875. `possible-completions (M-?)'
  1876.      List the possible completions of the text before the cursor.
  1877. `insert-completions ()'
  1878.      Insert all completions of the text before point that would have
  1879.      been generated by `possible-completions'.  By default, this is not
  1880.      bound to a key.
  1881. File: features.info,  Node: Keyboard Macros,  Next: Miscellaneous Commands,  Prev: Commands For Completion,  Up: Bindable Readline Commands
  1882. Keyboard Macros
  1883. ---------------
  1884. `start-kbd-macro (C-x ()'
  1885.      Begin saving the characters typed into the current keyboard macro.
  1886. `end-kbd-macro (C-x ))'
  1887.      Stop saving the characters typed into the current keyboard macro
  1888.      and save the definition.
  1889. `call-last-kbd-macro (C-x e)'
  1890.      Re-execute the last keyboard macro defined, by making the
  1891.      characters in the macro appear as if typed at the keyboard.
  1892. File: features.info,  Node: Miscellaneous Commands,  Prev: Keyboard Macros,  Up: Bindable Readline Commands
  1893. Some Miscellaneous Commands
  1894. ---------------------------
  1895. `re-read-init-file (C-x C-r)'
  1896.      Read in the contents of your init file, and incorporate any
  1897.      bindings or variable assignments found there.
  1898. `abort (C-g)'
  1899.      Abort the current editing command and ring the terminal's bell
  1900.      (subject to the setting of `bell-style').
  1901. `do-uppercase-version (M-a, M-b, ...)'
  1902.      Run the command that is bound to the corresoponding uppercase
  1903.      character.
  1904. `prefix-meta (ESC)'
  1905.      Make the next character that you type be metafied.  This is for
  1906.      people without a meta key.  Typing `ESC f' is equivalent to typing
  1907.      `M-f'.
  1908. `undo (C-_, C-x C-u)'
  1909.      Incremental undo, separately remembered for each line.
  1910. `revert-line (M-r)'
  1911.      Undo all changes made to this line.  This is like typing the `undo'
  1912.      command enough times to get back to the beginning.
  1913. `tilde-expand (M-~)'
  1914.      Perform tilde expansion on the current word.
  1915. `dump-functions ()'
  1916.      Print all of the functions and their key bindings to the readline
  1917.      output stream.  If a numeric argument is supplied, the output is
  1918.      formatted in such a way that it can be made part of an INPUTRC
  1919.      file.
  1920. `display-shell-version (C-x C-v)'
  1921.      Display version information about the current instance of Bash.
  1922. `shell-expand-line (M-C-e)'
  1923.      Expand the line the way the shell does when it reads it.  This
  1924.      performs alias and history expansion as well as all of the shell
  1925.      word expansions.
  1926. `history-expand-line (M-^)'
  1927.      Perform history expansion on the current line.
  1928. `insert-last-argument (M-., M-_)'
  1929.      A synonym for `yank-last-arg'.
  1930. `operate-and-get-next (C-o)'
  1931.      Accept the current line for execution and fetch the next line
  1932.      relative to the current line from the history for editing.  Any
  1933.      argument is ignored.
  1934. `emacs-editing-mode (C-e)'
  1935.      When in `vi' editing mode, this causes a switch back to emacs
  1936.      editing mode, as if the command `set -o emacs' had been executed.
  1937. File: features.info,  Node: Readline vi Mode,  Prev: Bindable Readline Commands,  Up: Command Line Editing
  1938. Readline vi Mode
  1939. ================
  1940.    While the Readline library does not have a full set of `vi' editing
  1941. functions, it does contain enough to allow simple editing of the line.
  1942. The Readline `vi' mode behaves as specified in the Posix 1003.2
  1943. standard.
  1944.    In order to switch interactively between `Emacs' and `Vi' editing
  1945. modes, use the `set -o emacs' and `set -o vi' commands (*note The Set
  1946. Builtin::.).  The Readline default is `emacs' mode.
  1947.    When you enter a line in `vi' mode, you are already placed in
  1948. `insertion' mode, as if you had typed an `i'.  Pressing ESC switches
  1949. you into `command' mode, where you can edit the text of the line with
  1950. the standard `vi' movement keys, move to previous history lines with
  1951. `k', and following lines with `j', and so forth.
  1952. File: features.info,  Node: Variable Index,  Next: Concept Index,  Prev: Command Line Editing,  Up: Top
  1953. Variable Index
  1954. **************
  1955. * Menu:
  1956. * auto_resume:                          Job Control Variables.
  1957. * BASH_VERSION:                         Bash Variables.
  1958. * bell-style:                           Readline Init Syntax.
  1959. * cdable_vars:                          C Shell Variables.
  1960. * CDPATH:                               Bourne Shell Variables.
  1961. * comment-begin:                        Readline Init Syntax.
  1962. * completion-query-items:               Readline Init Syntax.
  1963. * convert-meta:                         Readline Init Syntax.
  1964. * editing-mode:                         Readline Init Syntax.
  1965. * EUID:                                 Bash Variables.
  1966. * expand-tilde:                         Readline Init Syntax.
  1967. * FIGNORE:                              Bash Variables.
  1968. * histchars:                            Bash Variables.
  1969. * HISTCMD:                              Bash Variables.
  1970. * HISTCONTROL:                          Bash Variables.
  1971. * HISTFILE:                             Bash Variables.
  1972. * history_control:                      Bash Variables.
  1973. * HISTSIZE:                             Bash Variables.
  1974. * HOME:                                 Bourne Shell Variables.
  1975. * horizontal-scroll-mode:               Readline Init Syntax.
  1976. * HOSTFILE:                             Bash Variables.
  1977. * hostname_completion_file:             Bash Variables.
  1978. * HOSTTYPE:                             Bash Variables.
  1979. * IFS:                                  Bourne Shell Variables.
  1980. * IGNOREEOF:                            C Shell Variables.
  1981. * IGNOREEOF:                            Bash Variables.
  1982. * INPUTRC:                              Bash Variables.
  1983. * keymap:                               Readline Init Syntax.
  1984. * MAILCHECK:                            Bash Variables.
  1985. * MAILPATH:                             Bourne Shell Variables.
  1986. * mark-modified-lines:                  Readline Init Syntax.
  1987. * meta-flag:                            Readline Init Syntax.
  1988. * nolinks:                              Bash Variables.
  1989. * notify:                               Job Control Variables.
  1990. * no_exit_on_failed_exec:               Bash Variables.
  1991. * OLDPWD:                               Korn Shell Variables.
  1992. * OPTARG:                               Bourne Shell Variables.
  1993. * OPTIND:                               Bourne Shell Variables.
  1994. * OSTYPE:                               Bash Variables.
  1995. * output-meta:                          Readline Init Syntax.
  1996. * PATH:                                 Bourne Shell Variables.
  1997. * PROMPT_COMMAND:                       Bash Variables.
  1998. * PS1:                                  Bourne Shell Variables.
  1999. * PS2:                                  Bourne Shell Variables.
  2000. * PS3:                                  Korn Shell Variables.
  2001. * PS4:                                  Korn Shell Variables.
  2002. * PWD:                                  Korn Shell Variables.
  2003. * RANDOM:                               Korn Shell Variables.
  2004. * REPLY:                                Korn Shell Variables.
  2005. * SECONDS:                              Korn Shell Variables.
  2006. * show-all-if-ambiguous:                Readline Init Syntax.
  2007. * TMOUT:                                Korn Shell Variables.
  2008. * UID:                                  Bash Variables.
  2009. File: features.info,  Node: Concept Index,  Prev: Variable Index,  Up: Top
  2010. Concept Index
  2011. *************
  2012. * Menu:
  2013. * $else:                                Conditional Init Constructs.
  2014. * $endif:                               Conditional Init Constructs.
  2015. * $if:                                  Conditional Init Constructs.
  2016. * .:                                    Bourne Shell Builtins.
  2017. * ::                                    Bourne Shell Builtins.
  2018. * abort (C-g):                          Miscellaneous Commands.
  2019. * accept-line (Newline, Return):        Commands For History.
  2020. * alias:                                Alias Builtins.
  2021. * backward-char (C-b):                  Commands For Moving.
  2022. * backward-delete-char (Rubout):        Commands For Text.
  2023. * backward-kill-line (C-x Rubout):      Commands For Killing.
  2024. * backward-kill-word (M-DEL):           Commands For Killing.
  2025. * backward-word (M-b):                  Commands For Moving.
  2026. * beginning-of-history (M-<):           Commands For History.
  2027. * beginning-of-line (C-a):              Commands For Moving.
  2028. * bg:                                   Job Control Builtins.
  2029. * bind:                                 Bash Builtins.
  2030. * break:                                Bourne Shell Builtins.
  2031. * builtin:                              Bash Builtins.
  2032. * call-last-kbd-macro (C-x e):          Keyboard Macros.
  2033. * capitalize-word (M-c):                Commands For Text.
  2034. * case:                                 Conditional Constructs.
  2035. * cd:                                   Bourne Shell Builtins.
  2036. * clear-screen (C-l):                   Commands For Moving.
  2037. * command:                              Bash Builtins.
  2038. * complete (TAB):                       Commands For Completion.
  2039. * continue:                             Bourne Shell Builtins.
  2040. * declare:                              Bash Builtins.
  2041. * delete-char (C-d):                    Commands For Text.
  2042. * delete-horizontal-space ():           Commands For Killing.
  2043. * digit-argument (M-0, M-1, ... M-):    Numeric Arguments.
  2044. * dirs:                                 C Shell Builtins.
  2045. * do-uppercase-version (M-a, M-b, ...): Miscellaneous Commands.
  2046. * downcase-word (M-l):                  Commands For Text.
  2047. * dump-functions ():                    Miscellaneous Commands.
  2048. * echo:                                 Bourne Shell Builtins.
  2049. * enable:                               Bash Builtins.
  2050. * end-kbd-macro (C-x )):                Keyboard Macros.
  2051. * end-of-history (M->):                 Commands For History.
  2052. * end-of-line (C-e):                    Commands For Moving.
  2053. * eval:                                 Bourne Shell Builtins.
  2054. * event designators:                    Event Designators.
  2055. * exec:                                 Bourne Shell Builtins.
  2056. * exit:                                 Bourne Shell Builtins.
  2057. * expansion:                            History Interaction.
  2058. * export:                               Bourne Shell Builtins.
  2059. * fc:                                   Korn Shell Builtins.
  2060. * fg:                                   Job Control Builtins.
  2061. * for:                                  Looping Constructs.
  2062. * forward-char (C-f):                   Commands For Moving.
  2063. * forward-search-history (C-s):         Commands For History.
  2064. * forward-word (M-f):                   Commands For Moving.
  2065. * getopts:                              Bourne Shell Builtins.
  2066. * hash:                                 Bourne Shell Builtins.
  2067. * help:                                 Bash Builtins.
  2068. * history:                              C Shell Builtins.
  2069. * history events:                       Event Designators.
  2070. * History, how to use:                  Job Control Variables.
  2071. * history-search-backward ():           Commands For History.
  2072. * history-search-forward ():            Commands For History.
  2073. * if:                                   Conditional Constructs.
  2074. * insert-completions ():                Commands For Completion.
  2075. * interaction, readline:                Readline Interaction.
  2076. * jobs:                                 Job Control Builtins.
  2077. * kill:                                 Bourne Shell Builtins.
  2078. * Kill ring:                            Readline Killing Commands.
  2079. * kill-line (C-k):                      Commands For Killing.
  2080. * kill-whole-line ():                   Commands For Killing.
  2081. * kill-word (M-d):                      Commands For Killing.
  2082. * Killing text:                         Readline Killing Commands.
  2083. * let:                                  Korn Shell Builtins.
  2084. * let:                                  Arithmetic Builtins.
  2085. * local:                                Bash Builtins.
  2086. * logout:                               C Shell Builtins.
  2087. * next-history (C-n):                   Commands For History.
  2088. * non-incremental-forward-search-history (M-n): Commands For History.
  2089. * non-incremental-reverse-search-history (M-p): Commands For History.
  2090. * popd:                                 C Shell Builtins.
  2091. * possible-completions (M-?):           Commands For Completion.
  2092. * prefix-meta (ESC):                    Miscellaneous Commands.
  2093. * previous-history (C-p):               Commands For History.
  2094. * pushd:                                C Shell Builtins.
  2095. * pwd:                                  Bourne Shell Builtins.
  2096. * quoted-insert (C-q, C-v):             Commands For Text.
  2097. * re-read-init-file (C-x C-r):          Miscellaneous Commands.
  2098. * read:                                 Bourne Shell Builtins.
  2099. * Readline, how to use:                 Modifiers.
  2100. * readonly:                             Bourne Shell Builtins.
  2101. * redraw-current-line ():               Commands For Moving.
  2102. * return:                               Bourne Shell Builtins.
  2103. * reverse-search-history (C-r):         Commands For History.
  2104. * revert-line (M-r):                    Miscellaneous Commands.
  2105. * self-insert (a, b, A, 1, !, ...):     Commands For Text.
  2106. * set:                                  The Set Builtin.
  2107. * shift:                                Bourne Shell Builtins.
  2108. * source:                               C Shell Builtins.
  2109. * start-kbd-macro (C-x ():              Keyboard Macros.
  2110. * suspend:                              Job Control Builtins.
  2111. * tab-insert (M-TAB):                   Commands For Text.
  2112. * test:                                 Bourne Shell Builtins.
  2113. * tilde-expand (M-~):                   Miscellaneous Commands.
  2114. * times:                                Bourne Shell Builtins.
  2115. * transpose-chars (C-t):                Commands For Text.
  2116. * transpose-words (M-t):                Commands For Text.
  2117. * trap:                                 Bourne Shell Builtins.
  2118. * type:                                 Bash Builtins.
  2119. * typeset:                              Korn Shell Builtins.
  2120. * ulimit:                               Bash Builtins.
  2121. * umask:                                Bourne Shell Builtins.
  2122. * unalias:                              Alias Builtins.
  2123. * undo (C-_, C-x C-u):                  Miscellaneous Commands.
  2124. * universal-argument ():                Numeric Arguments.
  2125. * unix-line-discard (C-u):              Commands For Killing.
  2126. * unix-word-rubout (C-w):               Commands For Killing.
  2127. * unset:                                Bourne Shell Builtins.
  2128. * until:                                Looping Constructs.
  2129. * upcase-word (M-u):                    Commands For Text.
  2130. * wait:                                 Bourne Shell Builtins.
  2131. * while:                                Looping Constructs.
  2132. * yank (C-y):                           Commands For Killing.
  2133. * yank-last-arg (M-., M-_):             Commands For History.
  2134. * yank-nth-arg (M-C-y):                 Commands For History.
  2135. * yank-pop (M-y):                       Commands For Killing.
  2136. * Yanking text:                         Readline Killing Commands.
  2137. * [:                                    Bourne Shell Builtins.
  2138. Tag Table:
  2139. Node: Top
  2140. Node: Bourne Shell Features
  2141. Node: Looping Constructs
  2142. Node: Conditional Constructs
  2143. Node: Shell Functions
  2144. Node: Bourne Shell Builtins
  2145. Node: Bourne Shell Variables
  2146. Node: Other Bourne Shell Features
  2147. 11025
  2148. Node: Major Differences from the Bourne Shell
  2149. 11783
  2150. Node: Csh Features
  2151. 14194
  2152. Node: Tilde Expansion
  2153. 15087
  2154. Node: Brace Expansion
  2155. 15691
  2156. Node: C Shell Builtins
  2157. 17283
  2158. Node: C Shell Variables
  2159. 20578
  2160. Node: Korn Shell Features
  2161. 21088
  2162. Node: Korn Shell Constructs
  2163. 21826
  2164. Node: Korn Shell Builtins
  2165. 23037
  2166. Node: Korn Shell Variables
  2167. 25190
  2168. Node: Aliases
  2169. 26466
  2170. Node: Alias Builtins
  2171. 28833
  2172. Node: Bash Specific Features
  2173. 29356
  2174. Node: Invoking Bash
  2175. 30085
  2176. Node: Bash Startup Files
  2177. 32404
  2178. Node: Is This Shell Interactive?
  2179. 34247
  2180. Node: Bash Builtins
  2181. 35055
  2182. Node: The Set Builtin
  2183. 41437
  2184. Node: Bash Variables
  2185. 46377
  2186. Node: Shell Arithmetic
  2187. 50945
  2188. Node: Arithmetic Evaluation
  2189. 51307
  2190. Node: Arithmetic Expansion
  2191. 53028
  2192. Node: Arithmetic Builtins
  2193. 53862
  2194. Node: Printing a Prompt
  2195. 54334
  2196. Node: Job Control
  2197. 55599
  2198. Node: Job Control Basics
  2199. 56074
  2200. Node: Job Control Builtins
  2201. 60249
  2202. Node: Job Control Variables
  2203. 61768
  2204. Node: Using History Interactively
  2205. 63077
  2206. Node: History Interaction
  2207. 63584
  2208. Node: Event Designators
  2209. 64630
  2210. Node: Word Designators
  2211. 65461
  2212. Node: Modifiers
  2213. 66446
  2214. Node: Command Line Editing
  2215. 67755
  2216. Node: Introduction and Notation
  2217. 68415
  2218. Node: Readline Interaction
  2219. 69435
  2220. Node: Readline Bare Essentials
  2221. 70574
  2222. Node: Readline Movement Commands
  2223. 72104
  2224. Node: Readline Killing Commands
  2225. 72995
  2226. Node: Readline Arguments
  2227. 74698
  2228. Node: Readline Init File
  2229. 75649
  2230. Node: Readline Init Syntax
  2231. 76647
  2232. Node: Conditional Init Constructs
  2233. 83580
  2234. Node: Bindable Readline Commands
  2235. 85826
  2236. Node: Commands For Moving
  2237. 86496
  2238. Node: Commands For History
  2239. 87344
  2240. Node: Commands For Text
  2241. 89988
  2242. Node: Commands For Killing
  2243. 91727
  2244. Node: Numeric Arguments
  2245. 93176
  2246. Node: Commands For Completion
  2247. 93803
  2248. Node: Keyboard Macros
  2249. 94816
  2250. Node: Miscellaneous Commands
  2251. 95375
  2252. Node: Readline vi Mode
  2253. 97466
  2254. Node: Variable Index
  2255. 98343
  2256. Node: Concept Index
  2257. 101671
  2258. End Tag Table
  2259.